https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94911
--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> --- Since VLA is an extension for compatibility with C, it is strange that it behaves differently (does one use the value of n at the time of the typedef and the other at the time of the declaration?). This bug is about the optimization, maybe a separate report about the C++ behavior would make sense.