From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5812 invoked by alias); 9 Oct 2010 16:06:57 -0000 Received: (qmail 5802 invoked by uid 22791); 9 Oct 2010 16:06:55 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 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; Sat, 09 Oct 2010 16:06:51 +0000 From: "danglin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/45955] New: FAIL: gcc.dg/initpri1.c (test for excess errors) X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: danglin 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 Date: Sat, 09 Oct 2010 16:06:00 -0000 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-10/txt/msg00803.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45955 Summary: FAIL: gcc.dg/initpri1.c (test for excess errors) Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned@gcc.gnu.org ReportedBy: danglin@gcc.gnu.org Host: hppa2.0w-hp-hpux11.11 Target: hppa2.0w-hp-hpux11.11 Build: hppa2.0w-hp-hpux11.11 Executing on host: /test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/ /te st/gnu/gcc/gcc/gcc/testsuite/gcc.dg/initpri1.c -ansi -pedantic-errors -lm -o ./initpri1.exe (timeout = 300) WARNING: program timed out. compiler exited with status 1 FAIL: gcc.dg/initpri1.c (test for excess errors) Running under gdb, I see: Program received signal SIGINT, Interrupt. 0x01478e68 in build_cdtor (ctor_p=1 '\001', cdtors=0x400c9108) at ../../gcc/gcc/ipa.c:1490 1490 while (i < len); (gdb) bt #0 0x01478e68 in build_cdtor (ctor_p=1 '\001', cdtors=0x400c9108) at ../../gcc/gcc/ipa.c:1490 #1 0x01479384 in build_cdtor_fns () at ../../gcc/gcc/ipa.c:1565 #2 0x0147962c in ipa_cdtor_merge () at ../../gcc/gcc/ipa.c:1594 #3 0x00ca6da0 in execute_one_pass (pass=0x4001ca4c) at ../../gcc/gcc/passes.c:1562 #4 0x00ca8058 in execute_ipa_pass_list (pass=0x4001ca4c) at ../../gcc/gcc/passes.c:1929 #5 0x013ee044 in ipa_passes () at ../../gcc/gcc/cgraphunit.c:1734 #6 0x013ee1a8 in cgraph_optimize () at ../../gcc/gcc/cgraphunit.c:1769 #7 0x013eb62c in cgraph_finalize_compilation_unit () at ../../gcc/gcc/cgraphunit.c:1020 #8 0x000c262c in c_write_global_declarations () at ../../gcc/gcc/c-decl.c:9821 #9 0x00e2c434 in compile_file () at ../../gcc/gcc/toplev.c:946 #10 0x00e30508 in do_compile () at ../../gcc/gcc/toplev.c:2374 #11 0x00e30694 in toplev_main (argc=19, argv=0x7eff05e4) at ../../gcc/gcc/toplev.c:2415 #12 0x00373f34 in main (argc=19, argv=0x7eff05e4) at ../../gcc/gcc/main.c:36 There's a thinko in this code: /* Find the next batch of constructors/destructors with the same initialization priority. */ for (;i < j; i++) { tree call; fn = VEC_index (tree, cdtors, i); call = build_call_expr (fn, 0); if (ctor_p) DECL_STATIC_CONSTRUCTOR (fn) = 0; else DECL_STATIC_DESTRUCTOR (fn) = 0; /* We do not want to optimize away pure/const calls here. When optimizing, these should be already removed, when not optimizing, we want user to be able to breakpoint in them. */ TREE_SIDE_EFFECTS (call) = 1; append_to_statement_list (call, &body); } while (i < len);