From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26800 invoked by alias); 22 May 2010 21:38:49 -0000 Received: (qmail 26693 invoked by uid 48); 22 May 2010 21:38:35 -0000 Date: Sat, 22 May 2010 21:38:00 -0000 Subject: [Bug lto/44246] New: ICE with -fwhopr/-flto when using strlen and strcat without previous declaration X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "zsojka at seznam dot cz" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg02650.txt.bz2 testcase.c: ----------------------------- int main(int argc, char *argv[]) { strcat(argv[0], "X"); return strlen(argv[0]); } ---------------------------- Command line: $ gcc -flto testcase.c or $ gcc -fwhopr testcase.c Compiler output (-flto): $ /mnt/svn/gcc-trunk/binary-159696-lto-fortran/bin/gcc -flto testcase.c testcase.c: In function 'main': testcase.c:3:3: warning: incompatible implicit declaration of built-in function 'strcat' [enabled by default] testcase.c:4:10: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default] lto1: error: inlined_to pointer set for noninline callers lto1: error: inlined_to pointer set for noninline callers lto1: error: non-DECL_ONE_ONLY node in a same_comdat_group list lto1: error: same_comdat_group is not a circular list __builtin_strlen/1(-1) @0x7f2ce1a75690 (asm: strlen) (inline copy in main/0) availability:not_available called by: main/0 (1.00 per call) main/0 (1.00 per call) calls: References: Refering this function: lto1: internal compiler error: verify_cgraph_node failed Please submit a full bug report, with preprocessed source if appropriate. See for instructions. lto-wrapper: /mnt/svn/gcc-trunk/binary-159696-lto-fortran/bin/gcc returned 1 exit status collect2: lto-wrapper returned 1 exit status Compiler output (-fwhopr): $ /mnt/svn/gcc-trunk/binary-159696-lto-fortran/bin/gcc -fwhopr testcase.c testcase.c: In function 'main': testcase.c:3:3: warning: incompatible implicit declaration of built-in function 'strcat' [enabled by default] testcase.c:4:10: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default] lto1: internal compiler error: in function_and_variable_visibility, at ipa.c:642 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. lto-wrapper: /mnt/svn/gcc-trunk/binary-159696-lto-fortran/bin/gcc returned 1 exit status collect2: lto-wrapper returned 1 exit status Tested revisions: r159696 - crash r158969 - crash r158095 - OK -fwhopr, crash -flto 4.5 r158978 - OK -fwhopr, crash -flto (with checking) -- Summary: ICE with -fwhopr/-flto when using strlen and strcat without previous declaration Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zsojka at seznam dot cz GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44246