This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32912] New: [Regression] ICE with C99 compound literal expression
- From: "scovich at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jul 2007 09:04:13 -0000
- Subject: [Bug c++/32912] New: [Regression] ICE with C99 compound literal expression
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling the test case below gives the following ICE:
> bug.C: In function 'void bar()':
> bug.C:30: internal compiler error: in build_int_cst_wide, at tree.c:890
> Please submit a full bug report,
I think this might be related to bug 20103, except that gcc-4.1 handles the
test case just fine. The test case also compiles in 4.3 with -O{0,1,s} instead
of -O{2,3}. -ftree-pre is the culprit flag -- removing it from -O2 or adding it
to -O1 toggles the bug.
// g++-4.3-20070716 -msse3 -O2 bug.C
#include <emmintrin.h>
// Must be a vector, not a scalar
#if 0
typedef long v2d;
#else
typedef __m128i v2d;
#endif
v2d rval();
v2d g;
struct A { // Must have 2+ members
v2d a;
v2d b;
};
struct B { // Need a struct containing an A
A a;
};
struct C {
operator A() {
v2d l;
A a;
// Must compute (a ^ ~b). Neither (a ^ b) nor (a + ~b) breaks.
a.a ^= ~a.b; // globals, locals, and rvals don't break
a.a ^= ~(v2d) {0,0}; // members and compound literals do
return a;
}
};
void foo(B);
void bar() {
foo((B){C()});
}
--
Summary: [Regression] ICE with C99 compound literal expression
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: scovich at gmail dot com
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32912