OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [builtins-28.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* 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 "" } */
5
 
6
extern float crealf (float _Complex);
7
extern double creal (double _Complex);
8
extern long double creall (long double _Complex);
9
 
10
extern float cimagf (float _Complex);
11
extern double cimag (double _Complex);
12
extern long double cimagl (long double _Complex);
13
 
14
float _Complex fc;
15
double _Complex dc;
16
long double _Complex ldc;
17
 
18
void
19
foo (void)
20
{
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" } */
27
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.