From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32564 invoked by alias); 2 Feb 2012 16:19:12 -0000 Received: (qmail 32502 invoked by uid 22791); 2 Feb 2012 16:19:09 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,SUBJ_OBFU_PUNCT_FEW,TW_CB X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Feb 2012 16:18:54 +0000 From: "ro at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/52095] New: [4.7 regression] ICE compiling gcc.dg/sms-7.c: SEGV in fprintf Date: Thu, 02 Feb 2012 16:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-02/txt/msg00231.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52095 Bug #: 52095 Summary: [4.7 regression] ICE compiling gcc.dg/sms-7.c: SEGV in fprintf Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: ro@gcc.gnu.org Host: i386-pc-solaris2.10 Target: i386-pc-solaris2.10 Build: i386-pc-solaris2.10 Since 20111213, gcc.dg/sms-7.c FAILs on Solaris 10/x86, both 32 and 64-bit: FAIL: gcc.dg/sms-7.c (internal compiler error) FAIL: gcc.dg/sms-7.c (test for excess errors) WARNING: gcc.dg/sms-7.c compilation failed to produce executable Running cc1 $ cc1 -fpreprocessed sms-7.i -quiet -mtune=generic -march=pentium4 -O3 -fmodulo-sched -fstrict-aliasing -fdump-rtl-sms -fmodulo-sched-allow-regmoves --param sms-min-sc=1 -o sms-7.s gives: /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/sms-7.c: In function 'main': /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/sms-7.c:45:1: internal compiler error: Segmentation Fault With gdb, I find: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1 (LWP 1)] 0xfee063dc in strlen () from /lib/libc.so.1 (gdb) where #0 0xfee063dc in strlen () from /lib/libc.so.1 #1 0xfee6169a in _ndoprnt () from /lib/libc.so.1 #2 0xfee64229 in fprintf () from /lib/libc.so.1 #3 0x088689b0 in sms_schedule () at /vol/gcc/src/hg/trunk/local/gcc/modulo-sched.c:1414 #4 rest_of_handle_sms () at /vol/gcc/src/hg/trunk/local/gcc/modulo-sched.c:3338 #5 0x083bb744 in execute_one_pass (pass=pass@entry=0x8d82be0) at /vol/gcc/src/hg/trunk/local/gcc/passes.c:2081 #6 0x083bba9d in execute_pass_list (pass=0x8d82be0) at /vol/gcc/src/hg/trunk/local/gcc/passes.c:2136 #7 0x083bbab0 in execute_pass_list (pass=0x8d7f0a0) at /vol/gcc/src/hg/trunk/local/gcc/passes.c:2137 #8 0x08497e86 in tree_rest_of_compilation (fndecl=0xfeaaa780) at /vol/gcc/src/hg/trunk/local/gcc/tree-optimize.c:422 #9 0x0822ff07 in cgraph_expand_function (node=0xfea0e47c) at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:1819 #10 0x08231795 in cgraph_expand_all_functions () at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:1886 #11 cgraph_optimize () at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:2200 #12 0x08231cbf in cgraph_finalize_compilation_unit () at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:1328 #13 0x0816dc1c in c_write_global_declarations () at /vol/gcc/src/hg/trunk/local/gcc/c-decl.c:10030 #14 0x0845241b in compile_file () at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:573 #15 do_compile () at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:1938 #16 toplev_main (argc=15, argv=0x80474c0) at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:2014 #17 0x08af940b in main (argc=15, argv=0x80474c0) at /vol/gcc/src/hg/trunk/local/gcc/main.c:36 It turns out that sms_schedule calls fprintf with a NULL ptr since insn_file(insn) is NULL at this point. This is a regression from 4.6. Rainer