https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92641
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |c++ Summary|Function called from dead |VLA type finalized at the |branch |beginging of the statement | |rather at the point of use --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- The big question comes, where should the VLA type be finalized, at the use or at the beginning of the statement. Statement expressions create a new statement so you are seeing that. I don't know the correct answer. Since VLA types are not part of the C++ standard, what GCC does currently might be considered the correct answer (and most likely could not be implemented different either).