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
);
16 long double _Complex ldc
;
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" } */