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

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).