]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pr46921.c
1 /* PR c/46921 lost side effect when struct initializer expr uses comma
5 /* { dg-options "" } */
7 extern int printf(const char *, ...);
8 extern void abort (void);
10 typedef struct __uws_0
{ } uw_unit
;
11 uw_unit uw_unit_v
= {};
15 struct __uws_0 __uwf_1
;
16 struct __uws_1
* __uwf_2
;
19 static int left_hand_eval
= 0;
31 struct __uws_1 tmp
= {(foo("Inner\n"), uw_unit_v
)};
34 /* left hand expression in comma operator initializer must always be
35 evaluated if there are side effects. */