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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [c1x-pointer-float-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 C1X constraint against pointer / floating-point casts.  */
2
/* { dg-do compile } */
3
/* { dg-options "-std=c1x -pedantic-errors" } */
4
 
5
void *p;
6
float f;
7
double d;
8
long double ld;
9
_Complex float cf;
10
_Complex double cd;
11
_Complex long double cld;
12
 
13
void
14
func (void)
15
{
16
  f = (float) p; /* { dg-error "pointer" } */
17
  d = (double) p; /* { dg-error "pointer" } */
18
  ld = (long double) p; /* { dg-error "pointer" } */
19
  cf = (_Complex float) p; /* { dg-error "pointer" } */
20
  cd = (_Complex double) p; /* { dg-error "pointer" } */
21
  cld = (_Complex long double) p; /* { dg-error "pointer" } */
22
  p = (void *) f; /* { dg-error "pointer" } */
23
  p = (void *) d; /* { dg-error "pointer" } */
24
  p = (void *) ld; /* { dg-error "pointer" } */
25
  p = (void *) cf; /* { dg-error "pointer" } */
26
  p = (void *) cd; /* { dg-error "pointer" } */
27
  p = (void *) cld; /* { dg-error "pointer" } */
28
}

powered by: WebSVN 2.1.0

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