https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109968
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|False Warning |False Warning |stringop-overread when -O2 |stringop-overread at -O2 |and -fsanitize=address used | --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced testcase without -fsanitize=address: extern int write1 (int __fd, const void *__buf, size_t __n) __attribute__ ((__access__ (__read_only__, 2, 3))); typedef struct { struct { int b; int c; } s2; } S; void f1(int *a); int f(S *s ) { int err; f1(&s->s2.b); err = write1( 1, (const void *)&(s->s2), 6); return err; }