c/7344: performance regression on huge case statements
Robert Schiele
rschiele@uni-mannheim.de
Thu Oct 17 06:43:00 GMT 2002
On Thu, Oct 17, 2002 at 08:59:26AM -0400, Nathanael Nerode wrote:
> What should we do for a test case here? I feel that it should have one,
> but the minimal testcase is *inherently* 239K, so I'm not quite sure
> what to do here.
Hmm, we can do this testcase with the following short code:
---
#define CL0(a) case a: f(); goto c;
#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)
void f();
void a() {
int b;
c: switch (b) {
CL4(1)
}
}
---
Robert
--
Robert Schiele Tel.: +49-621-181-2517
Dipl.-Wirtsch.informatiker mailto:rschiele@uni-mannheim.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20021017/c8f24207/attachment.sig>
More information about the Gcc-bugs
mailing list