https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100994

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Consider with the same -O2 -fno-early-inlining -fno-tree-sra -fno-tree-fre
flags:

const struct S { unsigned b : 4; unsigned c : 9; } d;
__attribute__((noipa)) void foo (void) {}
static int bar (const struct S l) {
  ((struct S *)&l)->b += 2;
  ((struct S *)&l)->c += 4;
  foo ();
  return l.b + l.c;
}
__attribute__((noipa)) int baz (void) { return 2; }
int main () { const struct S d = { 1, baz () }; bar (d); return d.b - 1; }

This used to exit with 0 in r12-433 but exits with 2 in r12-434.

Reply via email to