https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93199
Bug ID: 93199
Summary: [8/9/10 Regression] Compile time hog in sink_clobbers
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
Target Milestone: ---
struct S {
S ();
S (int i);
int s;
operator bool () { return s != 0; }
};
int bar ();
int
foo (bool x)
{
S a;
try {
x ?
#define A(n) (a = S (0)),
#define B(n) A(n##0) A(n##1) A(n##2) A(n##3) A(n##4) \
A(n##5) A(n##6) A(n##7) A(n##8) A(n##9)
#define C(n) B(n##0) B(n##1) B(n##2) B(n##3) B(n##4) \
B(n##5) B(n##6) B(n##7) B(n##8) B(n##9)
#define D(n) C(n##0) C(n##1) C(n##2) C(n##3) C(n##4) \
C(n##5) C(n##6) C(n##7) C(n##8) C(n##9)
#define E(n) D(n##0) D(n##1) D(n##2) D(n##3) D(n##4) \
D(n##5) D(n##6) D(n##7) D(n##8) D(n##9)
#define F(n) E(n##0) E(n##1) E(n##2) E(n##3) E(n##4) \
E(n##5) E(n##6) E(n##7) E(n##8) E(n##9)
E(1) E(2) E(3)
0 : 1;
} catch (int) {
return 1;
}
return 0;
}
hits quadratic behavior in sink_clobbers at -O0. g++ 4.4 compiled this almost
instantly, 4.6 too, 4.7/4.8/4.9/5 eat a lot of RAM on this already during into
ssa pass, while 6+ just hog compile time (but not memory) in sink_clobbers.