#include "nop.h" struct S { float f, g; }; __attribute__((noipa)) void foo (struct S *p, int flag) { struct S s1, s2; if (flag) { s1 = *p; s2 = s1; } else { s2 = s1; } *(int *) &s2.f = 0; asm volatile (NOP : : : "memory"); asm volatile (NOP : : : "memory"); s2 = s1; asm volatile (NOP : : : "memory"); asm volatile (NOP : : : "memory"); } int __attribute__((noipa)) getint(void) { return 1; } int main () { struct S x = { 5.0f, 6.0f }; foo (&x, getint()); return 0; }