1/* PR c/5354 */ 2/* Verify that GCC preserves relevant stack slots. */ 3 4extern void abort(void); 5extern void exit(int); 6 7struct large { int x, y[9]; }; 8 9int main() 10{ 11 int fixed; 12 13 fixed = ({ int temp1 = 2; temp1; }) - ({ int temp2 = 1; temp2; }); 14 if (fixed != 1) 15 abort(); 16 17 fixed = ({ struct large temp3; temp3.x = 2; temp3; }).x 18 - ({ struct large temp4; temp4.x = 1; temp4; }).x; 19 if (fixed != 1) 20 abort(); 21 22 exit(0); 23} 24