public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/19097] New: Lots of else ifs take forever to compile
@ 2004-12-21  1:57 phython at gcc dot gnu dot org
  2004-12-21  2:39 ` [Bug rtl-optimization/19097] " pinskia at gcc dot gnu dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: phython at gcc dot gnu dot org @ 2004-12-21  1:57 UTC (permalink / raw)
  To: gcc-bugs

The following bit of code doesn't compile on my laptop (at -O2) because gcc gets
killed. This happens with gcc 3.3.5 and gcc 3.4.3 and gcc 4.0

#define CL0(a) else if (b == a) { f(); }
#define CL1(a) CL0(a##0) CL0(a##1) CL0(a##2) CL0(a##3) CL0(a##4) CL0(a##5) \
 CL0(a##6) CL0(a##7) CL0(a##8) CL0(a##9)
#define CL2(a) CL1(a##0) CL1(a##1) CL1(a##2) CL1(a##3) CL1(a##4) CL1(a##5) \
 CL1(a##6) CL1(a##7) CL1(a##8) CL1(a##9)
#define CL3(a) CL2(a##0) CL2(a##1) CL2(a##2) CL2(a##3) CL2(a##4) CL2(a##5) \
 CL2(a##6) CL2(a##7) CL2(a##8) CL2(a##9)
#define CL4(a) CL3(a##0) CL3(a##1) CL3(a##2) CL3(a##3) CL3(a##4) CL3(a##5) \
 CL3(a##6) CL3(a##7) CL3(a##8) CL3(a##9)
#define CL5(a) CL4(a##0) CL4(a##1) CL4(a##2) CL4(a##3) CL4(a##4) CL4(a##5) \
 CL4(a##6) CL4(a##7) CL4(a##8) CL4(a##9)

void f();

void a() {
  int b;
  if (b == 1) { f(); }
  CL4(1)
}

 Changing if (b == 1) to if (b) fixes the large compile time on gcc 4.0, but
keeps the large compile time problem with gcc 3.3 and 3.4.

-- 
           Summary: Lots of else ifs take forever to compile
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: phython at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-09-30 14:43 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-21  1:57 [Bug rtl-optimization/19097] New: Lots of else ifs take forever to compile phython at gcc dot gnu dot org
2004-12-21  2:39 ` [Bug rtl-optimization/19097] " pinskia at gcc dot gnu dot org
2004-12-21  8:38 ` steven at gcc dot gnu dot org
2004-12-21  8:47 ` steven at gcc dot gnu dot org
2004-12-23  1:43 ` steven at gcc dot gnu dot org
2004-12-24  1:00 ` [Bug rtl-optimization/19097] [3.4/4.0 regression] Quadratic behavior with many sets for the same register in gcse CPROP steven at gcc dot gnu dot org
2004-12-28 18:48 ` bonzini at gcc dot gnu dot org
2005-03-05 19:53 ` [Bug rtl-optimization/19097] [3.4/4.0/4.1 " pinskia at gcc dot gnu dot org
2005-03-05 23:37 ` steven at gcc dot gnu dot org
2005-06-08  3:32 ` phython at gcc dot gnu dot org
2005-06-08  9:38 ` steven at gcc dot gnu dot org
2005-06-08 12:44 ` phython at gcc dot gnu dot org
2005-08-23  7:29 ` phython at gcc dot gnu dot org
2005-08-25  5:44 ` phython at gcc dot gnu dot org
2005-08-25  6:40 ` phython at gcc dot gnu dot org
2005-08-25  7:06 ` phython at gcc dot gnu dot org
2005-09-19  0:14 ` pinskia at gcc dot gnu dot org
2005-09-19  0:15 ` steven at gcc dot gnu dot org
2005-09-30 14:43 ` amacleod at redhat dot com

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