Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Frontend / fixed_point_not_enabled.c
bloba1a60c5a6fa8007748d6ba5105e7956cc966c35c
1 // RUN: %clang_cc1 -x c -verify %s
3 // Primary fixed point types
4 signed short _Accum s_short_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
5 signed _Accum s_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
6 signed long _Accum s_long_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
7 unsigned short _Accum u_short_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
8 unsigned _Accum u_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
9 unsigned long _Accum u_long_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
11 // Aliased fixed point types
12 short _Accum short_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
13 _Accum accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
14 // expected-error@-1{{type specifier missing, defaults to 'int'}}
15 long _Accum long_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}}
17 // Cannot use fixed point suffixes
18 int accum_int = 10k; // expected-error{{invalid suffix 'k' on integer constant}}
19 int fract_int = 10r; // expected-error{{invalid suffix 'r' on integer constant}}
20 float accum_flt = 10.0k; // expected-error{{invalid suffix 'k' on floating constant}}
21 float fract_flt = 10.0r; // expected-error{{invalid suffix 'r' on floating constant}}