This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/80269] ICE with compile time constant sized array when using address sanitizer
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 31 Mar 2017 13:14:51 +0000
- Subject: [Bug sanitizer/80269] ICE with compile time constant sized array when using address sanitizer
- Auto-submitted: auto-generated
- References: <bug-80269-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80269
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
With -std=c++11 the assumption that this is compile time constant sized array
is bogus, std::max is constexpr only in -std=c++14 and later. It doesn't
matter if your variable is const, it is still initialized at runtime, so char
array[LIM]
is a VLA and this ICEs because of the PR79993.
*** This bug has been marked as a duplicate of bug 79993 ***