complex-promotion.c revision 5abfe2c2363d3c9f2597664edf3810a80017759f
1// RUN: clang %s -verify -fsyntax-only
2
3float a;
4
5int b[__builtin_classify_type(a + 1i) == 9 ? 1 : -1];
6int c[__builtin_classify_type(1i + a) == 9 ? 1 : -1];
7
8double d;
9__typeof__ (d + 1i) e;
10
11int f[sizeof(e) == 2 * sizeof(double) ? 1 : -1];
12
13int g;
14int h[__builtin_classify_type(g + 1.0i) == 9 ? 1 : -1];
15int i[__builtin_classify_type(1.0i + a) == 9 ? 1 : -1];
16