public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion.
@ 2011-07-13 14:32 bernds at gcc dot gnu.org
2011-07-13 23:12 ` [Bug tree-optimization/49735] [4.7 Regression] " pinskia at gcc dot gnu.org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: bernds at gcc dot gnu.org @ 2011-07-13 14:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
Summary: mips64-elf libgcc build fails with apparently infinite
recursion.
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: bernds@gcc.gnu.org
Created attachment 24751
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24751
A testcase
Configure a cross compiler with --target=mips64-elf. When building libgcc, cc1
goes into what seems to be an infinite recursion:
(gdb) bt
#0 0x083b22aa in estimate_calls_size_and_time (node=<value optimized out>,
size=0xf7484030, time=0xf748402c,
possible_truths=4294967294) at ../../trunk/gcc/ipa-inline-analysis.c:1748
#1 0x083b229d in estimate_calls_size_and_time (node=<value optimized out>,
size=0xf7484030, time=0xf748402c,
possible_truths=4294967294) at ../../trunk/gcc/ipa-inline-analysis.c:1743
#2 0x083b229d in estimate_calls_size_and_time (node=<value optimized out>,
size=0xf7484030, time=0xf748402c,
possible_truths=4294967294) at ../../trunk/gcc/ipa-inline-analysis.c:1743
I'm attaching the .i file.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
@ 2011-07-13 23:12 ` pinskia at gcc dot gnu.org
2011-07-13 23:18 ` pinskia at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-07-13 23:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |build, ice-on-valid-code
Target| |mips64-linux
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.07.13 23:12:32
Target Milestone|--- |4.7.0
Summary|mips64-elf libgcc build |[4.7 Regression] mips64-elf
|fails with apparently |libgcc build fails with
|infinite recursion. |apparently infinite
| |recursion.
Ever Confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-13 23:12:32 UTC ---
Confirmed.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
2011-07-13 23:12 ` [Bug tree-optimization/49735] [4.7 Regression] " pinskia at gcc dot gnu.org
@ 2011-07-13 23:18 ` pinskia at gcc dot gnu.org
2011-07-13 23:22 ` pinskia at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-07-13 23:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-13 23:18:11 UTC ---
Here is a short testcase:
typedef unsigned int UQItype __attribute__((mode (QI)));
static
UQItype sync_fetch_and_add_1 (UQItype *ptr, UQItype value)
{
return __sync_fetch_and_add (ptr, value);
};
typeof (sync_fetch_and_add_1) __sync_fetch_and_add_1 __attribute__((alias
("sync_fetch_and_add" "_" "1")));
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
2011-07-13 23:12 ` [Bug tree-optimization/49735] [4.7 Regression] " pinskia at gcc dot gnu.org
2011-07-13 23:18 ` pinskia at gcc dot gnu.org
@ 2011-07-13 23:22 ` pinskia at gcc dot gnu.org
2011-07-14 0:08 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-07-13 23:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-13 23:21:26 UTC ---
I almost want to say it was caused by:
r175169 | hubicka | 2011-06-18 01:33:47 -0700 (Sat, 18 Jun 2011) | 31 lines
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
` (2 preceding siblings ...)
2011-07-13 23:22 ` pinskia at gcc dot gnu.org
@ 2011-07-14 0:08 ` pinskia at gcc dot gnu.org
2011-07-14 9:08 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-07-14 0:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-14 00:07:51 UTC ---
This patch fixes the infinite loop:
Index: ipa-inline.c
===================================================================
--- ipa-inline.c (revision 176253)
+++ ipa-inline.c (working copy)
@@ -1170,6 +1170,10 @@ recursive_inlining (struct cgraph_edge *
/* Make sure that function is small enough to be considered for inlining.
*/
if (estimate_size_after_inlining (node, edge) >= limit)
return false;
+ /* Inlining a builtin recursively into itself should not be done. */
+ if (DECL_BUILT_IN (edge->callee->decl))
+ return false;
+
heap = fibheap_new ();
lookup_recursive_calls (node, node, heap);
if (fibheap_empty (heap))
--- CUT ---
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
` (3 preceding siblings ...)
2011-07-14 0:08 ` pinskia at gcc dot gnu.org
@ 2011-07-14 9:08 ` rguenth at gcc dot gnu.org
2011-07-14 18:27 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-07-14 9:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-07-14 09:05:32 UTC ---
It probably papers over a different issue though - even recursive inlining
should be limited by a --param, but appearantly that is not working here.
Honza?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
` (4 preceding siblings ...)
2011-07-14 9:08 ` rguenth at gcc dot gnu.org
@ 2011-07-14 18:27 ` pinskia at gcc dot gnu.org
2011-07-19 18:10 ` rsandifo at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-07-14 18:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-07-14 18:26:54 UTC ---
(In reply to comment #5)
> It probably papers over a different issue though - even recursive inlining
> should be limited by a --param, but appearantly that is not working here.
>
> Honza?
Oh it is working, just since this is a simple wrapper function (infinite loop
kinda) it is inlinining a lot.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
` (5 preceding siblings ...)
2011-07-14 18:27 ` pinskia at gcc dot gnu.org
@ 2011-07-19 18:10 ` rsandifo at gcc dot gnu.org
2011-08-02 14:41 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-07-19 18:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
rsandifo@gcc.gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rsandifo at gcc dot gnu.org
--- Comment #7 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2011-07-19 18:09:45 UTC ---
(In reply to comment #6)
> (In reply to comment #5)
> > It probably papers over a different issue though - even recursive inlining
> > should be limited by a --param, but appearantly that is not working here.
> >
> > Honza?
>
> Oh it is working, just since this is a simple wrapper function (infinite loop
> kinda) it is inlinining a lot.
I think Richard's point was that something like:
void bar (void);
static void foo (void) { bar (); }
void bar (void) __attribute__((alias("foo")));
shouldn't make gcc recurse infinitely (but now does).
Richard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
` (6 preceding siblings ...)
2011-07-19 18:10 ` rsandifo at gcc dot gnu.org
@ 2011-08-02 14:41 ` rguenth at gcc dot gnu.org
2011-08-03 20:00 ` hubicka at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-02 14:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|mips64-linux |
Priority|P3 |P1
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-02 14:29:11 UTC ---
Indeed.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
` (7 preceding siblings ...)
2011-08-02 14:41 ` rguenth at gcc dot gnu.org
@ 2011-08-03 20:00 ` hubicka at gcc dot gnu.org
2011-08-03 20:01 ` hubicka at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-08-03 20:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
--- Comment #9 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-08-03 20:00:22 UTC ---
Hmm, it looks like recursive_inlining_p predicate broke with presence of
aliases. I will take a look.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
` (8 preceding siblings ...)
2011-08-03 20:00 ` hubicka at gcc dot gnu.org
@ 2011-08-03 20:01 ` hubicka at gcc dot gnu.org
2011-08-05 20:21 ` hubicka at gcc dot gnu.org
2011-08-06 18:49 ` rsandifo at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-08-03 20:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |hubicka at gcc dot gnu.org
|gnu.org |
--- Comment #10 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-08-03 20:01:15 UTC ---
Mine, BTW
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
` (9 preceding siblings ...)
2011-08-03 20:01 ` hubicka at gcc dot gnu.org
@ 2011-08-05 20:21 ` hubicka at gcc dot gnu.org
2011-08-06 18:49 ` rsandifo at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-08-05 20:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
--- Comment #11 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-08-05 20:20:11 UTC ---
Author: hubicka
Date: Fri Aug 5 20:20:07 2011
New Revision: 177482
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177482
Log:
PR middle-end/49735
* gcc.c-torture/compile/pr49735.c: New testcase
* ipa-inline.c (recursive_inlining): Look through aliases.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr49735.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-inline.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/49735] [4.7 Regression] mips64-elf libgcc build fails with apparently infinite recursion.
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
` (10 preceding siblings ...)
2011-08-05 20:21 ` hubicka at gcc dot gnu.org
@ 2011-08-06 18:49 ` rsandifo at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2011-08-06 18:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49735
rsandifo@gcc.gnu.org <rsandifo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #12 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> 2011-08-06 18:49:17 UTC ---
Just to confirm that the build failure is now fixed. Thanks Jan!
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-08-06 18:49 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 14:32 [Bug tree-optimization/49735] New: mips64-elf libgcc build fails with apparently infinite recursion bernds at gcc dot gnu.org
2011-07-13 23:12 ` [Bug tree-optimization/49735] [4.7 Regression] " pinskia at gcc dot gnu.org
2011-07-13 23:18 ` pinskia at gcc dot gnu.org
2011-07-13 23:22 ` pinskia at gcc dot gnu.org
2011-07-14 0:08 ` pinskia at gcc dot gnu.org
2011-07-14 9:08 ` rguenth at gcc dot gnu.org
2011-07-14 18:27 ` pinskia at gcc dot gnu.org
2011-07-19 18:10 ` rsandifo at gcc dot gnu.org
2011-08-02 14:41 ` rguenth at gcc dot gnu.org
2011-08-03 20:00 ` hubicka at gcc dot gnu.org
2011-08-03 20:01 ` hubicka at gcc dot gnu.org
2011-08-05 20:21 ` hubicka at gcc dot gnu.org
2011-08-06 18:49 ` rsandifo 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).