https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85788
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-05-15 Ever confirmed|0 |1 Known to fail| |7.3.0, 8.1.0 --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- Confirmed at -O2 with GCC 8.1 but only at -O3 on trunk where the warning sees: n () { int * c; int b.2_13; int b.2_16; int pretmp_25; int pretmp_26; int _28; int _31; long unsigned int _33; <bb 2> [local count: 1073741826]: c_3 = d; if (c_3 != 0B) goto <bb 4>; [89.00%] else goto <bb 3>; [11.00%] <bb 3> [local count: 1073741817]: pretmp_25 = m.g; pretmp_26 = m.h; _28 = pretmp_25 / 8; _31 = pretmp_26 * _28; _33 = (long unsigned int) _31; b.2_16 = b; __builtin___memset_chk (&m.i, b.2_16, _33, 64000); [tail call] return; <bb 4> [local count: 955630226]: c_4 = e; if (c_4 != 0B) goto <bb 6>; [89.00%] else goto <bb 5>; [11.00%] <bb 5> [local count: 955630226]: MEM[(int *)&m] = 140733193420799; b.2_13 = b; __builtin___memset_chk (&m.i, b.2_13, 134180865, 64000); goto <bb 7>; [100.00%] <bb 6> [local count: 7731917263]: goto <bb 6>; [100.00%] <bb 7> [local count: 8687547448]: goto <bb 7>; [100.00%] } In function ‘a’, inlined from ‘make_str_raster.constprop’ at t.c:17:3, inlined from ‘n’ at t.c:22:12: t.c:5:3: warning: ‘__builtin___memset_chk’ writing 134180865 bytes into a region of size 64000 overflows the destination [-Wstringop-overflow=] __builtin___memset_chk(k, b, l, f); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~