PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / dfp / builtin-tgmath-dfp-err.c
blobb94c760c3ece1652019229ab2f8b5cb85030ca73
1 /* Test __builtin_tgmath: errors that indicate bad arguments in a call
2 to a type-generic macro, DFP involved. */
3 /* { dg-do compile } */
4 /* { dg-options "" } */
6 float f_f (float);
7 double f_d (double);
8 long double f_ld (long double);
9 _Complex float f_cf (_Complex float);
10 _Complex double f_cd (_Complex double);
11 _Complex long double f_cld (_Complex long double);
12 _Decimal32 f_d32 (_Decimal32);
13 _Decimal64 f_d64 (_Decimal64);
14 _Decimal128 f_d128 (_Decimal128);
15 float f_ff (float, float);
16 _Complex float f_cfcf (_Complex float, _Complex float);
17 _Decimal32 f_d32d32 (_Decimal32, _Decimal32);
18 _Complex float cf;
19 float f;
20 _Decimal32 d32;
22 void
23 test (void)
25 __builtin_tgmath (f_cf, f_cd, f_cld, d32); /* { dg-error "decimal floating-point argument 1 to complex-only type-generic function" } */
26 __builtin_tgmath (f_f, f_d, f_ld, d32); /* { dg-error "decimal floating-point argument 1 to binary-only type-generic function" } */
27 __builtin_tgmath (f_cfcf, f_d32d32, cf, d32); /* { dg-error "both complex and decimal floating-point arguments to type-generic function" } */
28 __builtin_tgmath (f_ff, f_d32d32, f, d32); /* { dg-error "both binary and decimal floating-point arguments to type-generic function" } */
29 __builtin_tgmath (f_d32, f_d64, f_d128, cf); /* { dg-error "complex argument 1 to decimal-only type-generic function" } */
30 __builtin_tgmath (f_d32, f_d64, f_d128, f); /* { dg-error "binary argument 1 to decimal-only type-generic function" } */
31 __builtin_tgmath (f_cfcf, f_d32d32, d32, cf); /* { dg-error "both complex and decimal floating-point arguments to type-generic function" } */
32 __builtin_tgmath (f_ff, f_d32d32, d32, f); /* { dg-error "both binary and decimal floating-point arguments to type-generic function" } */