From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9356 invoked by alias); 21 Dec 2004 01:57:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9344 invoked by uid 48); 21 Dec 2004 01:56:55 -0000 Date: Tue, 21 Dec 2004 01:57:00 -0000 From: "phython at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20041221015654.19097.phython@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug rtl-optimization/19097] New: Lots of else ifs take forever to compile X-Bugzilla-Reason: CC X-SW-Source: 2004-12/txt/msg02977.txt.bz2 List-Id: 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