This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/79929] [7 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
- From: "law at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 14 Apr 2017 20:44:58 +0000
- Subject: [Bug middle-end/79929] [7 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
- Auto-submitted: auto-generated
- References: <bug-79929-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929
--- Comment #10 from Jeffrey A. Law <law at redhat dot com> ---
At -O2 the memset is removed very early in the optimization pipeline. Thus
there's no warning at O2, but there is a warning at O1. Reality is some
warnings are going to give false positives when optimizations are throttled
back and I wouldn't call that a regression for the C testcase.
What I am concerned about is in the original Fortran based test, we warned at
-O2, but not at -O1. Something has been lost in the translation to C.