Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Frontend / fixed_point_unknown_conversions.c
blobb80c571307ccf98fcc9014013b5c3dfd90d64c43
1 // RUN: %clang_cc1 -verify -ffixed-point %s
3 void func(void) {
4 _Bool b;
5 char c;
6 int i;
7 float f;
8 double d;
9 double _Complex dc;
10 int _Complex ic;
11 struct S {
12 int i;
13 } s;
14 enum E {
16 } e;
17 int *ptr;
18 typedef int int_t;
19 int_t i2;
21 _Accum accum;
22 _Fract fract = accum; // ok
23 _Accum *accum_ptr;
25 accum = dc; // expected-error{{conversion between fixed point and '_Complex double' is not yet supported}}
26 accum = ic; // expected-error{{conversion between fixed point and '_Complex int' is not yet supported}}
27 accum = s; // expected-error{{assigning to '_Accum' from incompatible type 'struct S'}}
28 accum = ptr; // expected-error{{assigning to '_Accum' from incompatible type 'int *'}}
29 accum_ptr = ptr; // expected-warning{{incompatible pointer types assigning to '_Accum *' from 'int *'}}
31 dc = accum; // expected-error{{conversion between fixed point and '_Complex double' is not yet supported}}
32 ic = accum; // expected-error{{conversion between fixed point and '_Complex int' is not yet supported}}
33 s = accum; // expected-error{{assigning to 'struct S' from incompatible type '_Accum'}}
34 ptr = accum; // expected-error{{assigning to 'int *' from incompatible type '_Accum'}}
35 ptr = accum_ptr; // expected-warning{{incompatible pointer types assigning to 'int *' from '_Accum *'}}