Attached test case causes: c33c.i:12: internal compiler error: in emit_move_insn, at expr.c:2809 This happens with gcc-3.4.0 (but not gcc-3.3 or 3.1), and only in 64-bit mode. Removing 'u2s_e' struct member makes the bug go away. $ /usr/local/gcc-3.4.0/bin/gcc -c c33c.i -m64 -v Reading specs from /usr/local/gcc-3.4.0/lib/gcc/sparc-sun-solaris2.7/3.4.0/specs Configured with: /home/camel1/paul/Archive/gcc-3.4.0/configure --prefix=/usr/local/gcc-3.4.0 --enable-languages=c,c++ : (reconfigured) ../../../camel1/paul/Archive/gcc-3.4.0/configure --prefix=/usr/local/gcc-3.4.0 --enable-languages=c,c++ Thread model: posix gcc version 3.4.0 /usr/local/gcc-3.4.0/libexec/gcc/sparc-sun-solaris2.7/3.4.0/cc1 -fpreprocessed c33c.i -mptr64 -mstack-bias -mno-v8plus -quiet -dumpbase c33c.i -m64 -mcpu=v7 -auxbase c33c -version -o /home/solaris/development/devtest/tmp/ccQWlq8A.s GNU C version 3.4.0 (sparc-sun-solaris2.7) compiled by GNU C version 2.95.3 20010315 (release). GGC heuristics: --param ggc-min-expand=56 --param ggc-min-heapsize=49152 c33c.i: In function `unions': c33c.i:12: internal compiler error: in emit_move_insn, at expr.c:2809 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. --- cut --- c33c.i --- union u2 { struct { int u2s_a, u2s_b, u2s_c, u2s_d, u2s_e; } u2_s; double u2_d; } u2a; union u2 fu2(); void unions() { u2a = fu2(11); } --- cut --- c33c.i ---
Probably a fallout of the ABI fixes.
Investigating.
Subject: Bug 15783 CVSROOT: /cvs/gcc Module name: gcc Changes by: ebotcazou@gcc.gnu.org 2004-06-07 20:58:34 Modified files: gcc : ChangeLog gcc/config/sparc: sparc.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg: union-1.c Log message: PR target/15783 * config/sparc/sparc.c (function_arg_union_value): Add 'mode' parameter. Enumerate the registers inside the PARALLEL. (function_arg): Adjust call to function_arg_union_value. (function_value): Likewise. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3869&r2=2.3870 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sparc/sparc.c.diff?cvsroot=gcc&r1=1.301&r2=1.302 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3823&r2=1.3824 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/union-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
Subject: Bug 15783 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: ebotcazou@gcc.gnu.org 2004-06-07 21:03:08 Modified files: gcc : ChangeLog gcc/config/sparc: sparc.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg: union-1.c Log message: PR target/15783 * config/sparc/sparc.c (function_arg_union_value): Add 'mode' parameter. Enumerate the registers inside the PARALLEL. (function_arg): Adjust call to function_arg_union_value. (function_value): Likewise. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.476&r2=2.2326.2.477 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sparc/sparc.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.271.4.14&r2=1.271.4.15 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.199&r2=1.3389.2.200 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/union-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
See http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00378.html