https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104468
--- Comment #6 from Erik Carstensen <erik.carstensen at intel dot com> --- thanks! Looks like the second change repairs __attribute__((optimize("O0"))); this leads to a smaller reproducer: the problem is reproduced if I remove that attribute and compile with "-g -O0 -fvar-tracking" only. The first commit somehow enables "QI vector mode", whatever that is. 0.8s still seems like quite a lot; what happens in a recent gcc if you change the function to, say, void f(void) { // more than 4x slower if you add R2() R8(R256(fun(S,S,S,S);)) } and compile with -g -O0 -fvar-tracking ? if ~6s, then I suppose we are down to slow linear time; if ~50s, then we still have a quadratic behaviour.