public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/40760]  New: [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier
@ 2009-07-15  6:06 bonzini at gnu dot org
  2009-07-15  6:06 ` [Bug tree-optimization/40760] " bonzini at gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bonzini at gnu dot org @ 2009-07-15  6:06 UTC (permalink / raw)
  To: gcc-bugs

The testcase from PR/2161:

#define ONE     else if (0) { }
#define TEN     ONE ONE ONE ONE ONE ONE ONE ONE ONE ONE
#define HUN     TEN TEN TEN TEN TEN TEN TEN TEN TEN TEN
#define THOU    HUN HUN HUN HUN HUN HUN HUN HUN HUN HUN

void foo()
{
  if (0) { }
  /* 11,000 else if's.  */
  THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU THOU
}

as well as the following:

#define OONE    && (a()
#define OTEN    OONE OONE OONE OONE OONE OONE OONE OONE OONE OONE
#define OHUN    OTEN OTEN OTEN OTEN OTEN OTEN OTEN OTEN OTEN OTEN
#define OTHOU   OHUN OHUN OHUN OHUN OHUN OHUN OHUN OHUN OHUN OHUN

#define CONE    )
#define CTEN    CONE CONE CONE CONE CONE CONE CONE CONE CONE CONE
#define CHUN    CTEN CTEN CTEN CTEN CTEN CTEN CTEN CTEN CTEN CTEN
#define CTHOU   CHUN CHUN CHUN CHUN CHUN CHUN CHUN CHUN CHUN CHUN
void foo()
{
  a()
  /* 11,000 right-associated &&'s with side effects.  */
  OTHOU OTHOU OTHOU OTHOU OTHOU OTHOU OTHOU OTHOU OTHOU OTHOU OTHOU
  CTHOU CTHOU CTHOU CTHOU CTHOU CTHOU CTHOU CTHOU CTHOU CTHOU CTHOU;
}

fail with a segmentation fault do to recursion that is proportional to the
size of the program.


-- 
           Summary: [4.3/4.4/4.5 Regression] unbounded recursion in the
                    gimplifier
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bonzini at gnu dot org
 BugsThisDependsOn: 2161


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40760


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/40760] [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier
  2009-07-15  6:06 [Bug tree-optimization/40760] New: [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier bonzini at gnu dot org
@ 2009-07-15  6:06 ` bonzini at gnu dot org
  2009-07-15  7:33 ` steven at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bonzini at gnu dot org @ 2009-07-15  6:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bonzini at gnu dot org  2009-07-15 06:06 -------
A regression from when, well, there was no gimplifier.


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.0.0 4.5.0
      Known to work|                            |3.4.6
   Last reconfirmed|0000-00-00 00:00:00         |2009-07-15 06:06:34
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40760


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/40760] [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier
  2009-07-15  6:06 [Bug tree-optimization/40760] New: [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier bonzini at gnu dot org
  2009-07-15  6:06 ` [Bug tree-optimization/40760] " bonzini at gnu dot org
@ 2009-07-15  7:33 ` steven at gcc dot gnu dot org
  2009-07-22 21:58 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-07-15  7:33 UTC (permalink / raw)
  To: gcc-bugs



-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40760


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/40760] [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier
  2009-07-15  6:06 [Bug tree-optimization/40760] New: [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier bonzini at gnu dot org
  2009-07-15  6:06 ` [Bug tree-optimization/40760] " bonzini at gnu dot org
  2009-07-15  7:33 ` steven at gcc dot gnu dot org
@ 2009-07-22 21:58 ` rguenth at gcc dot gnu dot org
  2009-12-22 14:57 ` aldyh at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-22 21:58 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40760


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/40760] [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier
  2009-07-15  6:06 [Bug tree-optimization/40760] New: [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier bonzini at gnu dot org
                   ` (2 preceding siblings ...)
  2009-07-22 21:58 ` rguenth at gcc dot gnu dot org
@ 2009-12-22 14:57 ` aldyh at gcc dot gnu dot org
  2009-12-22 16:29 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aldyh at gcc dot gnu dot org @ 2009-12-22 14:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from aldyh at gcc dot gnu dot org  2009-12-22 14:56 -------
The problem here is a recursive call to gimplify_stmt in gimplify_cond_expr
with the true/false statements.  This would only happen on thousands of nested
ifs.

Should this really be a P2?  Can't we change this to a won't fix?

I can't see this happening in real code.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40760


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/40760] [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier
  2009-07-15  6:06 [Bug tree-optimization/40760] New: [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier bonzini at gnu dot org
                   ` (3 preceding siblings ...)
  2009-12-22 14:57 ` aldyh at gcc dot gnu dot org
@ 2009-12-22 16:29 ` jakub at gcc dot gnu dot org
  2009-12-22 17:18 ` aldyh at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-12-22 16:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2009-12-22 16:29 -------
And one can always bump the stack limit if needed.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40760


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/40760] [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier
  2009-07-15  6:06 [Bug tree-optimization/40760] New: [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier bonzini at gnu dot org
                   ` (4 preceding siblings ...)
  2009-12-22 16:29 ` jakub at gcc dot gnu dot org
@ 2009-12-22 17:18 ` aldyh at gcc dot gnu dot org
  2009-12-22 17:49 ` bonzini at gnu dot org
  2010-01-04 14:29 ` aldyh at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: aldyh at gcc dot gnu dot org @ 2009-12-22 17:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from aldyh at gcc dot gnu dot org  2009-12-22 17:18 -------
Jakub: Agreed.  How can we resolve/close/etc this bug?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40760


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/40760] [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier
  2009-07-15  6:06 [Bug tree-optimization/40760] New: [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier bonzini at gnu dot org
                   ` (5 preceding siblings ...)
  2009-12-22 17:18 ` aldyh at gcc dot gnu dot org
@ 2009-12-22 17:49 ` bonzini at gnu dot org
  2010-01-04 14:29 ` aldyh at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: bonzini at gnu dot org @ 2009-12-22 17:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from bonzini at gnu dot org  2009-12-22 17:49 -------
For me it's fine to close it, however note that 2161 was reported on a
(generated) real-world program.  I don't know whether there were really 11,000
else-ifs in the real-world program, probably not.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40760


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/40760] [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier
  2009-07-15  6:06 [Bug tree-optimization/40760] New: [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier bonzini at gnu dot org
                   ` (6 preceding siblings ...)
  2009-12-22 17:49 ` bonzini at gnu dot org
@ 2010-01-04 14:29 ` aldyh at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: aldyh at gcc dot gnu dot org @ 2010-01-04 14:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from aldyh at gcc dot gnu dot org  2010-01-04 14:29 -------
Increase your stack size.


-- 

aldyh at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40760


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-01-04 14:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-15  6:06 [Bug tree-optimization/40760] New: [4.3/4.4/4.5 Regression] unbounded recursion in the gimplifier bonzini at gnu dot org
2009-07-15  6:06 ` [Bug tree-optimization/40760] " bonzini at gnu dot org
2009-07-15  7:33 ` steven at gcc dot gnu dot org
2009-07-22 21:58 ` rguenth at gcc dot gnu dot org
2009-12-22 14:57 ` aldyh at gcc dot gnu dot org
2009-12-22 16:29 ` jakub at gcc dot gnu dot org
2009-12-22 17:18 ` aldyh at gcc dot gnu dot org
2009-12-22 17:49 ` bonzini at gnu dot org
2010-01-04 14:29 ` aldyh at gcc dot gnu dot 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).