1 /* Test for typeof evaluation: should be at the appropriate point in
2 the containing expression rather than just adding a statement. */
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
5 /* { dg-options "-std=gnu99" } */
7 extern void exit (int);
8 extern void abort (void);
15 int i = 0, j = -1, k = -1;
16 /* typeof applied to expression with cast. */
17 (j = ++i), (void)(typeof ((int (*)[(k = ++i)])p))p;
18 if (j != 1 || k != 2 || i != 2)
25 int i = 0, j = -1, k = -1;
26 /* typeof applied to type. */
27 (j = ++i), (void)(typeof (int (*)[(k = ++i)]))p;
28 if (j != 1 || k != 2 || i != 2)
35 int i = 0, j = -1, k = -1;
37 /* typeof applied to expression with cast that is used. */
38 (j = ++i), (void)((typeof (1 + (int (*)[(k = ++i)])p))p);
39 if (j != 1 || k != 2 || i != 2)