/* { dg-do run } */ /* { dg-options "-flto -flto-partition=none -fipa-dead-field-eliminate -fdump-ipa-structure-reorg -fipa-typelist-field=b -fipa-typelist-struct=astruct_s" } */ #include #include #include struct astruct_s { _Bool a; _Bool b; _Bool c; _Bool d; }; // PASS BY VALUE _Bool foo (struct astruct_s astruct) { _Bool *a = &astruct.a; assert (!*a); _Bool *c = a + 1; assert (*c); _Bool *d = a + 2; assert (*d); return *c; } int main (int argc, char **argv) { struct astruct_s astruct; astruct.a = 0; astruct.c = argc; astruct.d = 1; foo (astruct); }