2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / perf1.C
blobd75542751c73d6f58fa7cc2c8ea6f542f3a9f06e
1 // { dg-do assemble  }
3 // Test of severe performance regression from 2.95.  This code generates
4 // a heavily self-referential tree which caused the inliner to take
5 // O(3**N) time to scan it for function calls.
6 // Reported by Kelley Cook <kelley.cook@home.com>.  PR c++/1687.
8 bool in0 ;
9 bool in1 ;
10 bool in2 ;
11 bool in3 ;
12 bool in4 ;
13 bool in5 ;
14 bool in6 ;
15 bool in7 ;
16 bool in8 ;
17 bool in9 ;
18 bool in10;
19 bool in11;
20 bool in12;
21 bool in13;
22 bool in14;
23 bool in15;
24 bool in16;
25 bool in17;
26 bool in18;
27 bool in19;
28 bool in20;
29 bool in21;
30 bool in22;
31 bool in23;
32 bool in24;
33 bool in25;
34 bool in26;
35 bool in27;
36 bool in28;
37 bool in29;
38 bool in30;
39 bool in31;
40 unsigned long output;
42 void mux(void)
44   output =
45       (in0   ?  0x00000001 : 0) |
46       (in1   ?  0x00000002 : 0) |
47       (in2   ?  0x00000004 : 0) |
48       (in3   ?  0x00000008 : 0) |
49       (in4   ?  0x00000010 : 0) |
50       (in5   ?  0x00000020 : 0) |
51       (in6   ?  0x00000040 : 0) |
52       (in7   ?  0x00000080 : 0) |
53       (in8   ?  0x00000100 : 0) |
54       (in9   ?  0x00000200 : 0) |
55       (in10  ?  0x00000400 : 0) |
56       (in11  ?  0x00000800 : 0) |
57       (in12  ?  0x00001000 : 0) |
58       (in13  ?  0x00002000 : 0) |
59       (in14  ?  0x00004000 : 0) |
60       (in15  ?  0x00008000 : 0) |
61       (in16  ?  0x00010000 : 0) |
62       (in17  ?  0x00020000 : 0) |
63       (in18  ?  0x00040000 : 0) |
64       (in19  ?  0x00080000 : 0) |
65       (in20  ?  0x00100000 : 0) |
66       (in21  ?  0x00200000 : 0) |
67       (in22  ?  0x00400000 : 0) |
68       (in23  ?  0x00800000 : 0) |
69       (in24  ?  0x01000000 : 0) |
70       (in25  ?  0x02000000 : 0) |
71       (in26  ?  0x04000000 : 0) |
72       (in27  ?  0x08000000 : 0) |
73       (in28  ?  0x10000000 : 0) |
74       (in29  ?  0x20000000 : 0) |
75       (in30  ?  0x40000000 : 0) |
76       (in31  ?  0x80000000 : 0) ;