From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12331 invoked by alias); 21 Jun 2004 20:34:17 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 12322 invoked by uid 48); 21 Jun 2004 20:34:16 -0000 Date: Mon, 21 Jun 2004 20:34:00 -0000 From: "danfuzz at milk dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20040621203414.16123.danfuzz@milk.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug rtl-optimization/16123] New: THUMB -O1 -fnew-ra: struct copy causes ice X-Bugzilla-Reason: CC X-SW-Source: 2004-06/txt/msg02670.txt.bz2 List-Id: The following small file will cause gcc to crash with an internal compiler error: typedef struct { int a; int b; int c; } Splat; void zorch(Splat *s); void eek(Splat *s) { Splat s2 = *s; zorch(&s2); } That's it. The error reported is: eek.c: In function `eek': eek.c:13: internal compiler error: in cselib_record_set, at cselib.c:1196 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The salient part of cselib.c reads: if (REG_VALUES (dreg) == 0) { VARRAY_PUSH_UINT (used_regs, dreg); REG_VALUES (dreg) = new_elt_list (REG_VALUES (dreg), src_elt); } else { if (REG_VALUES (dreg)->elt == 0) REG_VALUES (dreg)->elt = src_elt; else /* The register should have been invalidated. */ abort (); // LINE 1196 } The file was compiled with this line: $ arm-elf-gcc -c eek.c -mthumb -fno-builtin -O1 -fnew-ra The compiler was built as follows: $ tar -xjvf gcc-core-3.4.0.tar.bz2 $ cd gcc-3.4.0 $ ./configure --prefix=/usr/local/armdev --target=arm-elf --with-newlib --enable-languages=c The following lines were uncommented in gcc/config/arm/t-arm-elf: MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork MULTILIB_DIRNAMES += normal interwork MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork* $ make $ sudo make install In case it matters, I'm currently using binutils-2.15. -- Summary: THUMB -O1 -fnew-ra: struct copy causes ice Product: gcc Version: new-ra Status: UNCONFIRMED Severity: normal Priority: P2 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: danfuzz at milk dot com CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: arm-elf-gcc http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16123