Let tree_single_nonzero_warnv_p use range information
[official-gcc.git] / gcc / testsuite / gcc.dg / builtins-28.c
blobbd76d6b97b7917db919ff21434f1cd4a88f66b2c
1 /* Test that creal and cimag built-in functions do not return lvalues. */
2 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
3 /* { dg-do compile } */
4 /* { dg-options "" } */
6 extern float crealf (float _Complex);
7 extern double creal (double _Complex);
8 extern long double creall (long double _Complex);
10 extern float cimagf (float _Complex);
11 extern double cimag (double _Complex);
12 extern long double cimagl (long double _Complex);
14 float _Complex fc;
15 double _Complex dc;
16 long double _Complex ldc;
18 void
19 foo (void)
21 crealf (fc) = 0; /* { dg-error "lvalue" "crealf not lvalue" } */
22 cimagf (fc) = 0; /* { dg-error "lvalue" "cimagf not lvalue" } */
23 creal (dc) = 0; /* { dg-error "lvalue" "creal not lvalue" } */
24 cimag (dc) = 0; /* { dg-error "lvalue" "cimag not lvalue" } */
25 creall (ldc) = 0; /* { dg-error "lvalue" "creall not lvalue" } */
26 cimagl (ldc) = 0; /* { dg-error "lvalue" "cimagl not lvalue" } */