[Bug testsuite/91258] [10 regression] g++.dg/ubsan/vla-1.C and gcc.dg/strlenopt-70.c fail starting with r273783

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 30 20:46:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91258

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #18 from Martin Sebor <msebor at gcc dot gnu.org> ---
I see.  And fold_builtin_alloca_with_align creates a char array and not one of
the declared type because it doesn't know what that type is.  That's too bad.

The warning code does see the offset but only the space remaining in the
destination at the offset because that's all compute_objsize() gives it.  If
GCC merged the two 32-bit stores into the VLA into a single 64-bit one the
warning might be closer to what you expect.

Anyway, I've suppressed the warning in r273915 so that should resolve the bug.


More information about the Gcc-bugs mailing list