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 <http://gcc.gnu.org/bugs.html> 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 <http://gcc.gnu.org/bugs.html> 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