[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 Richard Biener changed: What|Removed |Added Target Milestone|7.3 |7.4 --- Comment #27 from Richard Biener --- GCC 7.3 is being released, adjusting target milestone.
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 --- Comment #26 from Dominique d'Humieres --- Another variant without warning: subroutine gfcbug138 (yerrmsg) character(kind=1,len=*) :: yerrmsg yerrmsg = 1_"bug: " // yerrmsg(1:len(yerrmsg)-5) end subroutine gfcbug138
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 --- Comment #25 from Marc Glisse --- (In reply to Dominique d'Humieres from comment #24) > The following variant does not give the warning That's because the code has become obfuscated enough that we don't have the simplification l-(l+5) anymore (we see l-max(0,l+5) instead) and the argument to the dead memset call is not seen as a constant. But the dead code is still there, even if we don't warn.
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 --- Comment #24 from Dominique d'Humieres --- The following variant does not give the warning subroutine gfcbug138 (yerrmsg) character(kind=1,len=*) :: yerrmsg character(kind=1,len=len(yerrmsg)+5) :: tmp tmp = 1_"bug: " // yerrmsg yerrmsg = tmp end subroutine gfcbug138
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 --- Comment #23 from Marc Glisse --- (In reply to Harald Anlauf from comment #3) > subroutine gfcbug138 (yerrmsg) > character(kind=1,len=*) :: yerrmsg > yerrmsg = 1_"bug: " // yerrmsg > end subroutine gfcbug138 [...] > gfcbug138 (character(kind=1)[1:_yerrmsg] & restrict yerrmsg, integer(kind=4) > _yerrmsg) I don't know anything about fortran and this isn't the best way to fix this bug, but I was wondering if, for this kind of ABI (passing an array with a pointer and a length IIUC), fortran guarantees that the length is non-negative? If that's the case, could the front-end convey that information to the middle-end using set_range_info or some other mechanism?
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 Neil Carlson changed: What|Removed |Added CC||neil.n.carlson at gmail dot com --- Comment #22 from Neil Carlson --- I'm seeing these warning messages with essentially the same test case as comment 0 using 8.0 (20171123) at -O1 and higher. Same warning messages using 7.2.1 but only at -O2 and higher. Even if these are bogus (I hope), they really need to be gotten rid of.
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 Richard Biener changed: What|Removed |Added Target Milestone|7.2 |7.3
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 Richard Biener changed: What|Removed |Added Target Milestone|7.2 |7.3 --- Comment #22 from Richard Biener --- GCC 7.2 is being released, adjusting target milestone. --- Comment #23 from Richard Biener --- GCC 7.2 is being released, adjusting target milestone.
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 Richard Biener changed: What|Removed |Added Target Milestone|7.2 |7.3 --- Comment #22 from Richard Biener --- GCC 7.2 is being released, adjusting target milestone. --- Comment #23 from Richard Biener --- GCC 7.2 is being released, adjusting target milestone.
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 --- Comment #21 from Martin Sebor --- The rtl.c error was discussed in the context of some other bug having to do with profiledbootstrap failure (I can't find the bug now). If I recall, it's due to the same signed <-> unsigned conversion issue as a number of other warnings of this kind, i.e., rtvec_alloc taking a signed int argument that's being converted to size_t. Besides configuring with the --disable-werror recommended for profiledbootstrap, adding a gcc_assert(n >= 0) fixed it. Strangely, though, changing the function's argument to unsigned seemed to tickle some latent bug somewhere and caused GCC to crash during bootstrap. I never investigated why.
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 Alexander Ivchenko changed: What|Removed |Added CC||aivchenk at gmail dot com --- Comment #20 from Alexander Ivchenko --- Not sure whether it is connected, but when I bootstrap with: >../gcc_ref/configure --with-system-zlib --with-demangler-in-ld >--with-arch=corei7 --with-cpu=corei7 --with-fpmath=sse >--enable-shared --enable-host-shared --enable-clocale=gnu >--enable-cloog-backend=isl --enable-languages=c --enable-libmpx=yes >--with-build-config=bootstrap-lto >make In function ‘rtvec_alloc’, inlined from ‘copy_rtx_for_iterators’ at ../../gcc_ref/gcc/read-rtl.c:448:32: ../../gcc_ref/gcc/rtl.c:155:10: error: ‘memset’: specified size 18446744073709551608 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] memset (&rt->elem[0], 0, n * sizeof (rtx));
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 Jakub Jelinek changed: What|Removed |Added Target Milestone|7.0 |7.2 --- Comment #19 from Jakub Jelinek --- GCC 7.1 has been released.
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 Martin Sebor changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=80545 --- Comment #18 from Martin Sebor --- (In reply to janus from comment #17) I've been meaning to open a bug for this. It's now PR80545.
[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929 --- Comment #17 from janus at gcc dot gnu.org --- Sidenote: Apparently disabling such warnings for Fortran code is not possible. $ gfortran-8 c3.f90 -c -O2 -Wno-stringop-overflow gives me: f951: Warning: command line option ‘-Wstringop-overflow=0’ is valid for C/C++/ObjC/ObjC++ but not for Fortran This is problematic because obviously one can get such warnings on Fortran code (even without -Wall because -Wstringop-overflow=2 seems to be the default).