diff --git a/src/backend/gother.c b/src/backend/gother.c index 727d5c740355..ab363cdcefdc 100644 --- a/src/backend/gother.c +++ b/src/backend/gother.c @@ -921,9 +921,9 @@ void copyprop() /* and the d=b copy elem now reaches the end */ /* of the block (the d=a elem didn't). */ } - if (recalc) - goto Lagain; } + if (recalc) + goto Lagain; } /***************************** @@ -940,8 +940,6 @@ STATIC void cpwalk(register elem *n,vec_t IN) assert(n && IN); /*chkvecdim(exptop,0);*/ - if (recalc) - return; op = n->Eoper; if (op == OPcolon || op == OPcolon2) { @@ -1098,15 +1096,7 @@ STATIC void cpwalk(register elem *n,vec_t IN) n->ET = nt; changes++; - - // Mark ones we can no longer use - foreach(i,exptop,IN) - { - if (f == expnod[i]->E2->EV.sp.Vsym) - { recalc++; - break; - } - } + recalc++; } //else dbg_printf("not found\n"); noprop: diff --git a/test/compilable/test13193.d b/test/compilable/test13193.d new file mode 100644 index 000000000000..58cb617c4979 --- /dev/null +++ b/test/compilable/test13193.d @@ -0,0 +1,126 @@ +// REQUIRED_ARGS: -O -inline -c + + +final class SharedLib { + void getSymbol() {return getSymbolImpl();} + void getSymbolImpl() {return getSymbol_();} + /* add more intermediate functions to go slower */ + void getSymbol_() {} +} + + +void test13193() +{ +SharedLib ssllib; +void bindFunc() {ssllib.getSymbol();} + bindFunc(); /* add more of these to go slower */ + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); /* 10 */ + + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); /* 20 */ + + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); /* 30 */ + + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); /* 40 */ + + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); /* 50 */ + + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); /* 60 */ + + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); /* 70 */ + + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); /* 80 */ + + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); /* 90 */ + + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); + bindFunc(); /* 100 */ +} +