comparison gcc/testsuite/gcc.dg/builtin-tgmath-err-2.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* Test __builtin_tgmath: errors that indicate bad arguments in a call
2 to a type-generic macro, non-DFP. */
3 /* { dg-do compile } */
4 /* { dg-options "" } */
5
6 float f_f (float);
7 double f_d (double);
8 long double f_ld (long double);
9 void *p;
10 long double ld;
11 _Complex float cf;
12
13 void
14 test (void)
15 {
16 __builtin_tgmath (f_f, f_d, f_ld, p); /* { dg-error "invalid type of argument" } */
17 __builtin_tgmath (f_f, f_d, ld); /* { dg-error "no matching function for type-generic call" } */
18 __builtin_tgmath (f_f, f_d, cf); /* { dg-error "no matching function for type-generic call" } */
19 }