/* pr41317.c from the execute part of the gcc torture tests. */ #include #ifdef __SDCC #pragma std_c99 #endif struct A { int i; }; struct B { struct A a; int j; }; static void foo (struct B *p) { ((struct A *)p)->i = 1; } void testTortureExecute (void) { struct A a; a.i = 0; foo ((struct B *)&a); if (a.i != 1) ASSERT (0); return; }