public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/45955] New: FAIL: gcc.dg/initpri1.c (test for excess errors)
@ 2010-10-09 16:06 danglin at gcc dot gnu.org
2010-10-09 16:22 ` [Bug middle-end/45955] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: danglin at gcc dot gnu.org @ 2010-10-09 16:06 UTC (permalink / raw)
To: gcc-bugs
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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/45955] FAIL: gcc.dg/initpri1.c (test for excess errors)
2010-10-09 16:06 [Bug middle-end/45955] New: FAIL: gcc.dg/initpri1.c (test for excess errors) danglin at gcc dot gnu.org
@ 2010-10-09 16:22 ` rguenth at gcc dot gnu.org
2010-10-11 14:02 ` danglin at gcc dot gnu.org
2010-10-11 14:03 ` danglin at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-09 16:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45955
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-09 16:21:39 UTC ---
(In reply to comment #0)
> 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);
Looks like a funny cut&pasto. Just remove the last while (i < len) line
which actually is an endless loop.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/45955] FAIL: gcc.dg/initpri1.c (test for excess errors)
2010-10-09 16:06 [Bug middle-end/45955] New: FAIL: gcc.dg/initpri1.c (test for excess errors) danglin at gcc dot gnu.org
2010-10-09 16:22 ` [Bug middle-end/45955] " rguenth at gcc dot gnu.org
@ 2010-10-11 14:02 ` danglin at gcc dot gnu.org
2010-10-11 14:03 ` danglin at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: danglin at gcc dot gnu.org @ 2010-10-11 14:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45955
--- Comment #2 from John David Anglin <danglin at gcc dot gnu.org> 2010-10-11 14:02:08 UTC ---
Author: danglin
Date: Mon Oct 11 14:02:03 2010
New Revision: 165308
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165308
Log:
PR middle-end/45955
* ipa.c (build_cdtor): Delete endless loop.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/45955] FAIL: gcc.dg/initpri1.c (test for excess errors)
2010-10-09 16:06 [Bug middle-end/45955] New: FAIL: gcc.dg/initpri1.c (test for excess errors) danglin at gcc dot gnu.org
2010-10-09 16:22 ` [Bug middle-end/45955] " rguenth at gcc dot gnu.org
2010-10-11 14:02 ` danglin at gcc dot gnu.org
@ 2010-10-11 14:03 ` danglin at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: danglin at gcc dot gnu.org @ 2010-10-11 14:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45955
John David Anglin <danglin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> 2010-10-11 14:03:19 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-11 14:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-09 16:06 [Bug middle-end/45955] New: FAIL: gcc.dg/initpri1.c (test for excess errors) danglin at gcc dot gnu.org
2010-10-09 16:22 ` [Bug middle-end/45955] " rguenth at gcc dot gnu.org
2010-10-11 14:02 ` danglin at gcc dot gnu.org
2010-10-11 14:03 ` danglin at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).