[Bug tree-optimization/61140] [4.10 Regression] wrong code at -O1 and above on x86_64-linux-gnu

2014-05-18 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61140

--- Comment #5 from Zhendong Su su at cs dot ucdavis.edu ---
(In reply to Marc Glisse from comment #4)
 Thanks a lot for the PR, getting a nice short testcase so soon after the
 commit, while the patch was still fresh in my mind, was very useful.

You're welcome Marc. Thanks for the fix!


[Bug c++/21802] Two-stage name lookup fails for operators

2014-05-18 Thread richard-gccbugzilla at metafoo dot co.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21802

--- Comment #4 from Richard Smith richard-gccbugzilla at metafoo dot co.uk ---
EDG accepts this (which I believe is the correct answer). Clang and GCC reject
(in Clang's case, the callee is resolved in the template definition, but then
ADL is accidentally performed during template instantiation; I've not looked
into where this goes wrong for GCC). The bug seems valid to me.


[Bug c/61215] New: ICE building wine-1.7.19 with gcc-4.9-20140514

2014-05-18 Thread chris2553 at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61215

Bug ID: 61215
   Summary: ICE building wine-1.7.19 with gcc-4.9-20140514
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chris2553 at googlemail dot com

Created attachment 32815
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=32815action=edit
Preprcessed source file

I've bumped into an ICE when building wine-1.7.19 with gcc-4.9-20140514. The
build wine completes successfully with gcc-4.8-20140514.

My system is a 32 bit user space running on a 64 bit kernel built from the
latest 3.15.0 development sources. The hardware is a Fujitsu Lifebook AH531
laptop with 8GB RAM.

The gcc build is configured with:

--prefix=/usr --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu
--target=i386-pc-linux-gnu --infodir=/usr/info --mandir=/usr/man
--enable-shared --disable-static --with-system-zlib --enable-threads=posix
--enable-haifa --enable-languages=c,c++ --enable-long-long --enable-namespaces
--enable-multilib --with-gnu-as --with-gnu-ld --with-system-zlib --without-x
--disable-werror --disable-checking --enable-__cxa_atexit --disable-nls
--without-included-gettext i386-pc-linux

The command that triggers the ICE is:

gcc -c -o schedsvc.o schedsvc.c -I. -I../../include -D__WINESRC__ -D_REENTRANT
-fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement
-Wempty-body -Wignored-qualifiers   -Wstrict-prototypes -Wtype-limits
-Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith   -Wlogical-op
-fno-omit-frame-pointer -O3 -march=i686  -fno-omit-frame-pointer

The compiler output is:

schedsvc.c: In function 'SchRpcGetInstanceInfo':
schedsvc.c:613:1: internal compiler error: Segmentation fault
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

The preprocessed file (compressed with xz) is attached.


[Bug c/61215] ICE building wine-1.7.19 with gcc-4.9-20140514

2014-05-18 Thread chris2553 at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61215

Chris Clayton chris2553 at googlemail dot com changed:

   What|Removed |Added

 CC||chris2553 at googlemail dot com
  Known to work||4.8.3
  Known to fail||4.9.1

--- Comment #1 from Chris Clayton chris2553 at googlemail dot com ---
Correction: successful build was with gcc-4.8-20140515


[Bug target/61215] ICE building wine-1.7.19 with gcc-4.9-20140514

2014-05-18 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61215

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 Target||i686
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-05-18
 CC||trippels at gcc dot gnu.org
  Component|c   |target
   Target Milestone|--- |4.9.1
 Ever confirmed|0   |1

--- Comment #2 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
markus@x4 tmp % cat test.i
void fn1 (int *, ...);
int fn2 (int p1)
{
  fn1 (0, (short)(int)p1);
  return 0;
}

markus@x4 tmp % gcc -c -m32 -O2 -march=i686 test.i
test.i: In function ‘fn2’:
test.i:6:1: internal compiler error: in gen_add2_insn, at optabs.c:4718
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

[Bug c++/21802] Two-stage name lookup fails for operators

2014-05-18 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21802

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 CC|paolo.carlini at oracle dot com|

--- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com ---
Ah, Ok thanks. The EDG I was using as part of ICC also rejected it.


[Bug rtl-optimization/61215] [4.9 Regression] ICE in gen_add2_insn, at optabs.c:4718 when building wine-1.7.19

2014-05-18 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61215

Uroš Bizjak ubizjak at gmail dot com changed:

   What|Removed |Added

 CC||vmakarov at gcc dot gnu.org
  Component|target  |rtl-optimization

--- Comment #3 from Uroš Bizjak ubizjak at gmail dot com ---
LRA blindly emits HImode PLUS RTX, although m_PPRO does not enable it:

(gdb) bt
#0  internal_error (gmsgid=gmsgid@entry=0x1359098 in %s, at %s:%d) at
/home/uros/gcc-svn/trunk/gcc/diagnostic.c:1130
#1  0x00f52754 in fancy_abort (file=file@entry=0x103c190
/home/uros/gcc-svn/trunk/gcc/optabs.c, line=line@entry=4715, 
function=function@entry=0x103cd30 gen_add2_insn(rtx_def*,
rtx_def*)::__FUNCTION__ gen_add2_insn) at
/home/uros/gcc-svn/trunk/gcc/diagnostic.c:1190
#2  0x008fede4 in gen_add2_insn (x=0x71998fd8, y=0x71998fa8) at
/home/uros/gcc-svn/trunk/gcc/optabs.c:4715
#3  0x008a2113 in emit_add2_insn (x=0x71998fd8, y=0x71998fa8)
at /home/uros/gcc-svn/trunk/gcc/lra.c:290
#4  0x008a27ae in lra_emit_add (x=0x71998fd8, y=optimized out,
z=optimized out) at /home/uros/gcc-svn/trunk/gcc/lra.c:395

(gdb) f 4
#4  0x008a27ae in lra_emit_add (x=0x71998fd8, y=optimized out,
z=optimized out) at /home/uros/gcc-svn/trunk/gcc/lra.c:395
395   insn = emit_add2_insn (x, base);
(gdb) list
390   if (recog_memoized (insn)  0)
391 {
392   delete_insns_since (last);
393   /* Generate x = disp; x = x + base.  */
394   emit_move_insn (x, disp);
395   insn = emit_add2_insn (x, base);
396   lra_assert (insn != NULL_RTX);
397 }
398   /* Generate x = x + index.  */
399   if (index != NULL_RTX)

[Bug c++/61216] New: wrong name lookup for operator functions with using-declaration

2014-05-18 Thread palpatin91 at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61216

Bug ID: 61216
   Summary: wrong name lookup for operator functions with
using-declaration
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: trivial
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: palpatin91 at mail dot ru

In GCC 4.8.1 for Windows XP:
-
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=f:/dev-cpp/mingw32/bin/../libexec/gcc/mingw32/4.8.1/lto-wrap
per.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32
--build=m
ingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto
--enable-libssp --disable-multilib
--enable-languages=c,c++,fortran,objc,obj-c++
,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry
--enable-l
ibstdcxx-debug --enable-version-specific-runtime-libs
--with-gmp=/usr/src/pkg/gm
p-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld
--
with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes
--enable-
libgomp --enable-threads --with-libiconv-prefix=/mingw32
--with-libintl-prefix=/
mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)
-

following code fragment gives compilation error:
-
class C {

};

namespace N {
C operator ++(C obj) { return obj; }
}

C operator ++(C obj) { return obj; }

int main()
{
using N::operator ++;
C c;
++c;
}
-
main.cpp: In function 'int main()':
main.cpp:69:2: error: ambiguous overload for 'operator++' (operand type is 'C')
  ++c;
  ^
main.cpp:69:2: note: candidates are:
main.cpp:60:4: note: C N::operator++(C)
 C operator ++(C obj) { return obj; }
^
main.cpp:63:4: note: C operator++(C)
 C operator ++(C obj) { return obj; }
^
-
But according to 13.3.1.2p3:
The set of non-member candidates is the result of the unqualified lookup of
operator@ in the context
of the expression according to the usual rules for name lookup in unqualified
function calls (3.4.2)
except that all member functions are ignored.

And the following code compiles just fine:
-
namespace N {
void f() {}
}

void f() {}

int main()
{
using N::f;
f();
}
-
So I assume in case of operator functions it should compile also and choose
N::operator ++ version


[Bug c++/61216] wrong name lookup for operator functions with using-declaration

2014-05-18 Thread palpatin91 at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61216

rylai palpatin91 at mail dot ru changed:

   What|Removed |Added

   Severity|trivial |minor


[Bug libstdc++/61217] New: pop_heap can't guarantee At most 2 * log(last - first) comparisons

2014-05-18 Thread kan.liu.229 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61217

Bug ID: 61217
   Summary: pop_heap can't guarantee At most 2 * log(last - first)
comparisons
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: kan.liu.229 at gmail dot com

pop_heap uses __adjust_heap to percolate down the hole. 

Inside __adjust_heap, it uses __value stores the value where was in position
__result(__last). After percolating down the hole, it uses __push_heap to push
back the __value. Process of percolatiing down takes 2 * logN comparasion, and
__push_heap takes another 2 * logN, 4 * logN in total, which excceed the
requirement 2 * log(last - first) comparisons of standard.


[Bug lto/61218] New: lto ICE building libcilkrts with 4.9.0

2014-05-18 Thread ncahill_alt at yahoo dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61218

Bug ID: 61218
   Summary: lto ICE building libcilkrts with 4.9.0
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ncahill_alt at yahoo dot com

Created attachment 32816
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=32816action=edit
minimal testcase

I was getting an ICE building gcc-4.9.0 with lto enabled (that is, -flto
-ffat-lto-objects), I traced it to symbol_test.o.  I then reduced the
preprocessed output of symbol_test.c, this is what it reduces to:

--- bug.c ---
int main ()
{
_Cilk_spawn foo();
}
--- end bug.c ---

To cause the bug, run make or issue these commands:
gcc -fcilkplus -flto -c bug.c -o bug.o
gcc bug.o

--- output ---
lto1: internal compiler error: in streamer_get_builtin_tree, at
tree-streamer-in.c:1124
Please submit a full bug report,
with preprocessed source if appropriate.
See https://bugs.gentoo.org/ for instructions.
lto-wrapper: /usr/i686-pc-linux-gnu/gcc-bin/4.9.0/gcc returned 1 exit status
/usr/lib/gcc/i686-pc-linux-gnu/4.9.0/../../../../i686-pc-linux-gnu/bin/ld:
fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status
--- end output ---

The output of gcc -v is included in gccdashv.txt, and this is on i686 32-bit.
Thank you.


[Bug target/48576] wrong code when accessing variables in a large stack frame

2014-05-18 Thread mikpelinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48576

--- Comment #8 from Mikael Pettersson mikpelinux at gmail dot com ---
This got fixed for 4.9+ by Bernd Schmidt's Fix for reloads_unique_chain_p
patch in r203596: https://gcc.gnu.org/ml/gcc-patches/2013-10/msg01041.html. 
The patch submission describes a problem very similar to this one, so I'm
fairly certain the fix is proper.

The patch backports easily to 4.8 and 4.7 and fixes the bug there too.


[Bug rtl-optimization/50588] gcc produce incorrect inlined code with -march=athlon -O2

2014-05-18 Thread mikpelinux at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50588

--- Comment #18 from Mikael Pettersson mikpelinux at gmail dot com ---
This is now fixed for 4.8+ by Eric's PR60452 patch.  Verified by backporting
that to 4.6.4 and seeing the bug on this PR's test case go away.


[Bug c++/61216] wrong name lookup for operator functions with using-declaration

2014-05-18 Thread daniel.kruegler at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61216

Daniel Krügler daniel.kruegler at googlemail dot com changed:

   What|Removed |Added

 CC||daniel.kruegler@googlemail.
   ||com

--- Comment #1 from Daniel Krügler daniel.kruegler at googlemail dot com ---
Your comparison doesn't make sense, because in your second example there is no
ADL involved. Change it to

class C {};

namespace N {
void f(C) {}
}

void f(C) {}

int main()
{
  using N::f;
  C c;
  f(c);
}

and you will notice the same ambiguity.

[Bug rtl-optimization/50588] gcc produce incorrect inlined code with -march=athlon -O2

2014-05-18 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50588

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE
   Target Milestone|--- |4.8.3

--- Comment #19 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
 This is now fixed for 4.8+ by Eric's PR60452 patch.  Verified by backporting
 that to 4.6.4 and seeing the bug on this PR's test case go away.

Indeed, it's the same issue.

*** This bug has been marked as a duplicate of bug 60452 ***


[Bug rtl-optimization/60452] [4.8/4.9 Regression] wrong code at -O1 with large offsets in the frame

2014-05-18 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60452

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 CC||newsgrp at duradsl dot 
dyndns.org

--- Comment #16 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
*** Bug 50588 has been marked as a duplicate of this bug. ***


[Bug c++/61216] wrong name lookup for operator functions with using-declaration

2014-05-18 Thread palpatin91 at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61216

--- Comment #2 from rylai palpatin91 at mail dot ru ---
(In reply to Daniel Krügler from comment #1)
Thank you to point it out.

[Bug c++/61216] wrong name lookup for operator functions with using-declaration

2014-05-18 Thread palpatin91 at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61216

rylai palpatin91 at mail dot ru changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from rylai palpatin91 at mail dot ru ---
Closed.


[Bug c/61129] Feature request: integer-overflow-detecting arithmetic intrinsics

2014-05-18 Thread eggert at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61129

Paul Eggert eggert at gnu dot org changed:

   What|Removed |Added

 CC||eggert at gnu dot org

--- Comment #2 from Paul Eggert eggert at gnu dot org ---
It'd be nice if this were higher priority. I've been wanting this for years. We
jump through a lot of confusing hoops in GNU applications to test for integer
overflow, both signed and unsigned. See, for example, INT_MULTIPLY_OVERFLOW in:

http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/intprops.h;h=d0bb7a6f57734e15e535cfc6b287a555dc6ccbb3;hb=HEAD

Also, the need for a fast test for unsigned multiplication overflow recently
came up in glibc internals discussions when writing a memory allocator. See:

https://sourceware.org/ml/libc-alpha/2014-05/msg00480.html


[Bug target/61219] New: float to double conversion do not silence sNaN on soft-float ARM

2014-05-18 Thread aurelien at aurel32 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61219

Bug ID: 61219
   Summary: float to double conversion do not silence sNaN on
soft-float ARM
   Product: gcc
   Version: 4.10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aurelien at aurel32 dot net
  Host: armv5tejl-unknown-linux-gnueabi
Target: armv5tejl-unknown-linux-gnueabi
 Build: armv5tejl-unknown-linux-gnueabi

Consider the following code:

#define _GNU_SOURCE
#include stdio.h
#include math.h

int main (void)
{
  float sNaN = __builtin_nansf ();
  double x = (double) sNaN;
  return issignaling(x);
}

It returns 1 on soft-float ARM, but 0 on hard-float ARM or other architecture.
Quoting the IEEE Std 754 standard:

Under default exception handling, any operation signaling an invalid operation
exception and for which a floating-point result is to be delivered shall
deliver a quiet NaN.

Given the soft float ARM code ignores exceptions and always provides a result,
a float to double conversion of a signaling NaN should return a quiet NaN. This
case is not handled in extendsfdf2.

This bug is basically present since the ARM EABI support has been added to GCC.

Patch will follow on the gcc-patches mailing list.


[Bug target/61219] float to double conversion do not silence sNaN on soft-float ARM

2014-05-18 Thread aurelien at aurel32 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61219

--- Comment #1 from Aurelien Jarno aurelien at aurel32 dot net ---
Patch: https://gcc.gnu.org/ml/gcc-patches/2014-05/msg01421.html


[Bug c/61129] Feature request: integer-overflow-detecting arithmetic intrinsics

2014-05-18 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61129

--- Comment #3 from Andrew Pinski pinskia at gcc dot gnu.org ---
(In reply to Paul Eggert from comment #2)
 It'd be nice if this were higher priority. I've been wanting this for years.
 We jump through a lot of confusing hoops in GNU applications to test for
 integer overflow, both signed and unsigned. See, for example,
 INT_MULTIPLY_OVERFLOW in:
 
 http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/intprops.h;
 h=d0bb7a6f57734e15e535cfc6b287a555dc6ccbb3;hb=HEAD
 
 Also, the need for a fast test for unsigned multiplication overflow recently
 came up in glibc internals discussions when writing a memory allocator. See:
 
 https://sourceware.org/ml/libc-alpha/2014-05/msg00480.html

You would still need them to compile with older GCCs anyways.  Glibc still
needs to compiler with a few year old GCC.


[Bug c/61129] Feature request: integer-overflow-detecting arithmetic intrinsics

2014-05-18 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61129

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-05-18
 CC||manu at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #4 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
I think this was the last message:

https://gcc.gnu.org/ml/gcc/2014-04/msg00194.html

[Bug rtl-optimization/61220] New: ICE on valid code at -O2 on x86_64-linux-gnu in maybe_record_trace_start, at dwarf2cfi.c:2239

2014-05-18 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61220

Bug ID: 61220
   Summary: ICE on valid code at -O2 on x86_64-linux-gnu in
maybe_record_trace_start, at dwarf2cfi.c:2239
   Product: gcc
   Version: 4.10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu

The following code causes an ICE when compiled with the current gcc trunk at
-O2 on x86_64-linux-gnu in 64-bit mode (but not in 32-bit mode). 

It is a regression from 4.9.x.

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.10.0 20140518 (experimental) [trunk revision 210581] (GCC) 
$ 
$ gcc-trunk -Os small.c; a.out
$ gcc-4.9.0 -O2 small.c; a.out
$ 
$ gcc-trunk -O2 small.c
small.c: In function ‘main’:
small.c:36:1: internal compiler error: in maybe_record_trace_start, at
dwarf2cfi.c:2239
 }
 ^
0x68d049 maybe_record_trace_start
../../gcc-trunk/gcc/dwarf2cfi.c:2239
0x68d7b6 scan_trace
../../gcc-trunk/gcc/dwarf2cfi.c:2416
0x68df5a create_cfi_notes
../../gcc-trunk/gcc/dwarf2cfi.c:2570
0x68df5a execute_dwarf2_frame
../../gcc-trunk/gcc/dwarf2cfi.c:2925
0x68df5a execute
../../gcc-trunk/gcc/dwarf2cfi.c:3405
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.
$  

---

int a, c, d, e, f, g, h, i, j, k;

struct S0
{
  int f0;
  int f1;
  int f2;
};

struct S1
{
  int f0;
  int f1;
  struct S0 f2;
} b; 

void
fn1 (struct S1 p)
{
  for (; k; k++)
h = j ? a : a - 1;
  d = i;
}

int
main ()
{
  int l[5] = { 0 };
  fn1 (b);
  for (c = 0; c  3; c++)
for (g = 0; g  3; g++)
  l[c * 2] = e = l[c];
  if (f)
fn1 (b);
  return 0;
}

[Bug tree-optimization/61221] New: ICE on valid code at -O1 and above on x86_64-linux-gnu

2014-05-18 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61221

Bug ID: 61221
   Summary: ICE on valid code at -O1 and above on x86_64-linux-gnu
   Product: gcc
   Version: 4.10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu

The following code causes an ICE when compiled with the current gcc trunk at
-O1 and above on x86_64-linux-gnu in both 32-bit and 64-bit modes.

It is a regression from 4.9.x.

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.10.0 20140518 (experimental) [trunk revision 210581] (GCC) 
$ 
$ gcc-trunk -O0 -c small.c
$ gcc-4.9.0 -O1 -c small.c
$ 
$ gcc-trunk -O1 -c small.c
small.c: In function ‘bar’:
small.c:30:1: internal compiler error: Segmentation fault
 }
 ^
0x988c1f crash_signal
../../gcc-trunk/gcc/toplev.c:337
0xa5b6de gimple_code
../../gcc-trunk/gcc/gimple.h:1405
0xa5b6de gimple_nop_p
../../gcc-trunk/gcc/gimple.h:5559
0xa5b6de walk_non_aliased_vuses(ao_ref*, tree_node*, void* (*)(ao_ref*,
tree_node*, unsigned int, void*), void* (*)(ao_ref*, tree_node*, void*, bool),
void*)
../../gcc-trunk/gcc/tree-ssa-alias.c:2550
0xb02599 vn_reference_lookup(tree_node*, tree_node*, vn_lookup_kind,
vn_reference_s**)
../../gcc-trunk/gcc/tree-ssa-sccvn.c:2117
0xae040a eliminate_dom_walker::before_dom_children(basic_block_def*)
../../gcc-trunk/gcc/tree-ssa-pre.c:4285
0xe93527 dom_walker::walk(basic_block_def*)
../../gcc-trunk/gcc/domwalk.c:177
0xaddcad eliminate
../../gcc-trunk/gcc/tree-ssa-pre.c:4429
0xade193 execute
../../gcc-trunk/gcc/tree-ssa-pre.c:4852
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.
$ 

---

void __assert_fail (void);

int **a, b, c, e, *j;
short *d, **f;

int *
foo ()
{
  *a = j;
  if (!(1  e)) 
__assert_fail ();
  return 0;
}

void
bar ()
{
  int *g = b;
  short **h = d;
  if ((f = d) != h)
for (; b;)
  {
int i = 1;
if (i)
  g = foo ();
c = 0;
  }
  if (!g)
__assert_fail ();
}

[Bug middle-end/61141] [4.10 Regression] c-common.c:1502:1: ICE: in reset_insn_used_flags, at emit-rtl.c:2677

2014-05-18 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61141

--- Comment #5 from John David Anglin danglin at gcc dot gnu.org ---
Patch:
http://gcc.gnu.org/ml/gcc-patches/2014-05/msg01405.html


[Bug rtl-optimization/61222] New: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in decompose, at rtl.h:1456

2014-05-18 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61222

Bug ID: 61222
   Summary: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu
in decompose, at rtl.h:1456
   Product: gcc
   Version: 4.10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu

The following code causes an ICE when compiled with the current gcc trunk at
-O2 and -O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes.

It is a regression from 4.9.x.

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.10.0 20140518 (experimental) [trunk revision 210581] (GCC) 
$ 
$ gcc-trunk -Os small.c; a.out
$ gcc-4.9.0 -O2 small.c; a.out
$ 
$ gcc-trunk -O2 small.c
small.c: In function ‘foo’:
small.c:16:1: internal compiler error: in decompose, at rtl.h:1456
 }
 ^
0x9725a8 wi::int_traitsstd::pairrtx_def*, machine_mode ::decompose(long*,
unsigned int, std::pairrtx_def*, machine_mode const)
../../gcc-trunk/gcc/rtl.h:1454
0x96ade9 wi::int_traitsstd::pairrtx_def*, machine_mode ::decompose(long*,
unsigned int, std::pairrtx_def*, machine_mode const)
../../gcc-trunk/gcc/rtl.h:1454
0x96ade9 wide_int_ref_storagestd::pairrtx_def*, machine_mode 
../../gcc-trunk/gcc/wide-int.h:959
0x96ade9 generic_wide_intstd::pairrtx_def*, machine_mode 
../../gcc-trunk/gcc/wide-int.h:735
0x96ade9 substd::pairrtx_def*, machine_mode, std::pairrtx_def*,
machine_mode 
../../gcc-trunk/gcc/wide-int.h:2349
0x96ade9 simplify_const_binary_operation(rtx_code, machine_mode, rtx_def*,
rtx_def*)
../../gcc-trunk/gcc/simplify-rtx.c:3732
0xe6d2eb simplify_shift_const_1
../../gcc-trunk/gcc/combine.c:10352
0xe6d625 simplify_shift_const
../../gcc-trunk/gcc/combine.c:10526
0xe7567d combine_simplify_rtx
../../gcc-trunk/gcc/combine.c:5873
0xe77a8a subst
../../gcc-trunk/gcc/combine.c:5170
0xe752ab combine_simplify_rtx
../../gcc-trunk/gcc/combine.c:5250
0xe77a8a subst
../../gcc-trunk/gcc/combine.c:5170
0xe777a8 subst
../../gcc-trunk/gcc/combine.c:5115
0xe777a8 subst
../../gcc-trunk/gcc/combine.c:5115
0xe777a8 subst
../../gcc-trunk/gcc/combine.c:5115
0xe78d7e try_combine
../../gcc-trunk/gcc/combine.c:3138
0xe7eab3 combine_instructions
../../gcc-trunk/gcc/combine.c:1370
0xe7eab3 rest_of_handle_combine
../../gcc-trunk/gcc/combine.c:13865
0xe7eab3 execute
../../gcc-trunk/gcc/combine.c:13909
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.
$ 

--

int a, b, d, e;
char c;

void
foo ()
{
  for (; a; a++)
{
  d = ((b == 0) ^ (129 + a));
  c = d * 9;
  e = c  1;
  if (e)
for (;;)
  ;
}
}

int
main ()
{
  foo (); 
  return 0;
}

[Bug libstdc++/61223] New: libstdc++ build fail due to pop lr register

2014-05-18 Thread terry.guo at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61223

Bug ID: 61223
   Summary: libstdc++ build fail due to pop lr register
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: terry.guo at arm dot com

When build file gcc/libstdc++-v3/libsupc++/eh_arm.cc for Thumb-1 target, run
into below error:

/tmp/ccJ7atpP.s: Assembler messages:
/tmp/ccJ7atpP.s:26: Error: invalid register list to push/pop instruction --
`pop {r1,r2,r3,lr}'

According to ARM arch manual, only PC and low registers are allowed in POP
instruction.

This failure happens with commit:

commit 13795f627c41a40f028d98e75f19774bc3a795b1
Author: merzlyakovao merzlyakovao@138bc75d-0d04-0410-961f-82ee72b054a4
Date:   Fri May 16 13:16:33 2014 +

2014-05-16  Alexey Merzlyakov  alexey.merzlya...@samsung.com

PR libstdc++/60758
* libsupc++/eh_arm.cc (__cxa_end_cleanup): Change r4 to lr in
save/restore
and add unwind directives.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210515
138bc75d-0d04-0410-961f-82ee72b054a4


[Bug tree-optimization/61224] New: ICE in rtl.h

2014-05-18 Thread ishiura-compiler at ml dot kwansei.ac.jp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61224

Bug ID: 61224
   Summary: ICE in rtl.h
   Product: gcc
   Version: 4.10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ishiura-compiler at ml dot kwansei.ac.jp

GCC 4.10.0 ICEs on the following code. (x86_64)


 $ cat test.c

 int a, b, d;
 int main (void)
 {
   int c = a  1;
   d = 1  (((c | (b - 842))  1) + 1);
   return 0;
 }


 $ x86_64-unknown-linux-gnu-gcc-4.10.0 test.c -O2
 test.c: In function 'main':
 test.c:8:1: internal compiler error: in decompose, at rtl.h:1456
  }
  ^
 0x4f1296 wi::int_traitsstd::pairrtx_def*, machine_mode ::decompose(long*,
unsigned int, std::pairrtx_def*, machine_mode const)
  /home/hassy/gcc/gcc/rtl.h:1454
 0x9ac619 wi::int_traitsstd::pairrtx_def*, machine_mode ::decompose(long*,
unsigned int, std::pairrtx_def*, machine_mode const)
  /home/hassy/gcc/gcc/rtl.h:1454
 0x9ac619 wide_int_ref_storagestd::pairrtx_def*, machine_mode 
  /home/hassy/gcc/gcc/wide-int.h:959
 0x9ac619 generic_wide_intstd::pairrtx_def*, machine_mode 
  /home/hassy/gcc/gcc/wide-int.h:735
 0x9ac619 substd::pairrtx_def*, machine_mode, std::pairrtx_def*,
machine_mode 
  /home/hassy/gcc/gcc/wide-int.h:2349
 0x9ac619 simplify_const_binary_operation(rtx_code, machine_mode, rtx_def*,
rtx_def*)
  /home/hassy/gcc/gcc/simplify-rtx.c:3732
 0xe7153b simplify_shift_const_1
  /home/hassy/gcc/gcc/combine.c:10352
 0xe71875 simplify_shift_const
  /home/hassy/gcc/gcc/combine.c:10526
 0xe798cd combine_simplify_rtx
  /home/hassy/gcc/gcc/combine.c:5873
 0xe7bcda subst
  /home/hassy/gcc/gcc/combine.c:5170
 0xe794fb combine_simplify_rtx
  /home/hassy/gcc/gcc/combine.c:5250
 0xe7bcda subst
  /home/hassy/gcc/gcc/combine.c:5170
 0xe7b9f8 subst
  /home/hassy/gcc/gcc/combine.c:5115
 0xe7b9f8 subst
  /home/hassy/gcc/gcc/combine.c:5115
 0xe7b9f8 subst
  /home/hassy/gcc/gcc/combine.c:5115
 0xe7b82a subst
  /home/hassy/gcc/gcc/combine.c:5036
 0xe7cfce try_combine
  /home/hassy/gcc/gcc/combine.c:3138
 0xe82d03 combine_instructions
  /home/hassy/gcc/gcc/combine.c:1370
 0xe82d03 rest_of_handle_combine
  /home/hassy/gcc/gcc/combine.c:13865
 0xe82d03 execute
  /home/hassy/gcc/gcc/combine.c:13909
 Please submit a full bug report,
 with preprocessed source if appropriate.
 Please include the complete backtrace with any bug report.
 See http://gcc.gnu.org/bugs.html for instructions.


 $ x86_64-unknown-linux-gnu-gcc-4.10.0 -v
 Using built-in specs.
 COLLECT_GCC=x86_64-unknown-linux-gnu-gcc-4.10.0

COLLECT_LTO_WRAPPER=/usr/local/x86_64-tools/gcc-4.10.0/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
 Target: x86_64-unknown-linux-gnu
 Configured with: /home/hassy/gcc/configure
--prefix=/usr/local/x86_64-tools/gcc-4.10.0/ --with-gmp=/usr/local/gmp-5.1.1/
--with-mpfr=/usr/local/mpfr-3.1.2/ --with-mpc=/usr/local/mpc-1.0.1/
--disable-multilib --disable-nls --enable-languages=c
 Thread model: posix
 gcc version 4.10.0 20140518 (experimental) (GCC)


[Bug middle-end/58094] [4.9 Regression] IPA devirt testsuite errors

2014-05-18 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58094

Jan Hubicka hubicka at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |hubicka at gcc dot 
gnu.org

--- Comment #11 from Jan Hubicka hubicka at gcc dot gnu.org ---
Mine, that testcase is fragile, perhaps we can just disable the template (it
was originally testing a scenario that no longer happens anyway)


[Bug target/60606] [ARM] ICE with asm (mov ..., pc)

2014-05-18 Thread d.salikhov at samsung dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60606

--- Comment #6 from D.Salikhov d.salikhov at samsung dot com ---
Created attachment 32817
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=32817action=edit
Yet another code sample

Add less factitious code sample reproducing the issue.


[Bug target/58066] GCC mis-compiles access to TLS variable with -fPIC on x86_64

2014-05-18 Thread wmi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066

--- Comment #7 from wmi at gcc dot gnu.org ---
Author: wmi
Date: Mon May 19 05:25:45 2014
New Revision: 210601

URL: http://gcc.gnu.org/viewcvs?rev=210601root=gccview=rev
Log:
2014-05-18  Wei Mi  w...@google.com

PR target/58066
* gcc.target/i386/pr58066.c: Replace pattern matching of .cfi
directive with rtl insns. Add effective-target of fpic and
tls_native.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/pr58066.c