GCC for ia64-linux gets an ICE compiling this test case, which is extracted from gcc.dg/compat/struct-by-value-5_x.c: ----------- typedef struct { float a; float b; } Sf2; Sf2 g1, g2, g3, g4, g5, g6; extern void testSf2 (Sf2, Sf2, Sf2, Sf2, Sf2, Sf2, Sf2, Sf2, Sf2, Sf2, Sf2, Sf2); void test2_Sf2 (Sf2 s1, Sf2 s2, Sf2 s3, Sf2 s4, Sf2 s5, Sf2 s6) { testSf2 (s1, g1, s2, g2, s3, g3, s4, g4, s5, g5, s6, g6); } ----------- Output from gcc version 3.4 20030617 (experimental): bug1.c: In function `test2_Sf2': bug1.c:10: internal compiler error: in emit_block_move, at expr.c:1793 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. The test case passes with 3.0.4 and 3.2 and fails with 3.3 and mainline. It started failing with the following patch, which probably exposes some latent target bug since the same test passes on several other platforms: --- gcc/gcc/ChangeLog --- 2002-08-20 Richard Henderson <rth@redhat.com> * expr.c (TARGET_MEM_FUNCTIONS): Transform to boolean. (emit_block_move): Split out subroutines. (emit_block_move_via_movstr): New. (emit_block_move_via_libcall): New. Emit bcopy via normal call also. (emit_block_move_libcall_fn): New. Construct function prototype for bcopy as well. (clear_storage): Split out subroutines. (clear_storage_via_clrstr): New. (clear_storage_via_libcall): New. Emit bzero as a normal call also. (clear_storage_libcall_fn): New. Construct function prototype for bzero as well. (emit_push_insn): Use emit_block_move. (expand_assignment): Booleanize TARGET_MEM_FUNCTIONS. (store_constructor): Likewise.
Confirmed with gcc 3.3 branch and mainline 20030616 for ia64-hpux as well. Bug occurs in both 32bit and 64bit mode. Works fine with gcc 3.2.3, so this is a regression.
Postponed until GCC 3.3.3.
This no longer ICEs on the mainline but still does on the tree-ssa, so maybe something changed between the last time the tree-ssa was merged in or this is still a latent bug in 3.4.
I believe this bug should be closed out. I reproduced it on IA64 HP-UX with GCC 3.3.2 and then applied Jim Wilson's patch from http://gcc.gnu.org/ml/gcc-patches/2003-12/msg00145.html which is already on the mainline and the 3.3 branch and it fixed the problem. I didn't test the tree-ssa branch but I think it has been merged onto that branch as well. I verified that it does not happen on ToT but I did not test Top-of-3.3 branch (just official 3.3 with Jim's patch).
Fixed for 3.3.3.