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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [builtin-complex-err-1.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Test __builtin_complex errors.  */
2
/* { dg-do compile } */
3
/* { dg-options "-std=c1x -pedantic-errors" } */
4
 
5
typedef double D;
6
 
7
double d;
8
 
9
_Complex double dc = __builtin_complex (1.0, (D) 0.0);
10
 
11
_Complex double dc2 = __builtin_complex (d, 0.0); /* { dg-error "not constant" } */
12
 
13
_Complex float fc = __builtin_complex (1.0f, 1); /* { dg-error "not of real binary floating-point type" } */
14
 
15
_Complex float fc2 = __builtin_complex (1, 1.0f); /* { dg-error "not of real binary floating-point type" } */
16
 
17
_Complex float fc3 = __builtin_complex (1.0f, 1.0); /* { dg-error "different types" } */
18
 
19
void
20
f (void)
21
{
22
  __builtin_complex (0.0); /* { dg-error "wrong number of arguments" } */
23
  __builtin_complex (0.0, 0.0, 0.0); /* { dg-error "wrong number of arguments" } */
24
}
25
 
26
void (*p) (void) = __builtin_complex; /* { dg-error "cannot take address" } */

powered by: WebSVN 2.1.0

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