http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53761
Bug #: 53761 Summary: ICE (only with C++) on incorrect transparent union (first field has floating point type) Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: br+...@waldteufel.eu While compiling typedef union { double x; } __attribute__(( __transparent_union__ )) example_t; void fail(example_t x) { } int main() { example_t x; fail(x); } as C code results in a warning message (see below for detailed system information) > gcc fail.c fail.c:1:9: warning: union cannot be made transparent [enabled by default] compiling the same code as C++ results in an ICE > g++ -v fail.cc Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /build/src/gcc-4.7.1/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu --disable-multilib --disable-libssp --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-checking=release Thread model: posix gcc version 4.7.1 (GCC) COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/cc1plus -quiet -v -D_GNU_SOURCE fail.cc -quiet -dumpbase fail.cc -mtune=generic -march=x86-64 -auxbase fail -version -o /tmp/cc6IkFB2.s GNU C++ (GCC) version 4.7.1 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.1, GMP version 5.0.5, MPFR version 3.1.0-p10, MPC version 0.9 GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=126590 ignoring nonexistent directory "/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1 /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/x86_64-unknown-linux-gnu /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/backward /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/include /usr/local/include /usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/include-fixed /usr/include End of search list. GNU C++ (GCC) version 4.7.1 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.7.1, GMP version 5.0.5, MPFR version 3.1.0-p10, MPC version 0.9 GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=126590 Compiler executable checksum: ed88b587bcb9a173af71789c9d103676 fail.cc: In function 'int main()': fail.cc:9:11: internal compiler error: in convert_move, at expr.c:325 Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.archlinux.org/> for instructions.