https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108398
Yann Droneaud <yann at droneaud dot fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yann at droneaud dot fr
--- Comment #6 from Yann Droneaud <yann at droneaud dot fr> ---
c-reduce comes up with the following reproducer:
#include <string.h>
typedef struct {
int a;
} b;
typedef struct {
b c[2];
} d;
d e;
int f = 2;
int main() {
b *g;
for (g = e.c; f; g++)
switch (g->a) {
case 0:
memmove(g, g + 1, sizeof(b));
f--;
g--;
}
}
gcc -fsanitize=undefined doesn't catch any issue ...