This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70514] Variable length arrays lead to garbage in another array
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 03 Apr 2016 12:31:00 +0000
- Subject: [Bug c++/70514] Variable length arrays lead to garbage in another array
- Auto-submitted: auto-generated
- References: <bug-70514-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70514
--- Comment #6 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Chris Warrick from comment #5)
> Thanks for debugging my code, and sorry for wasting time.
No problem. It is a pity that GCC static analysis capabilities are not powerful
enough to catch this case, but -fsanitize is your friend. Perhaps useful:
https://gcc.gnu.org/wiki/FAQ#misoptimization