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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [c-c++-common/] [pr33193.c] - Blame information for rev 686

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 686 jeremybenn
/* PR c/33193 */
2
/* { dg-do compile } */
3
 
4
struct a {float x, y; };
5
 
6
float f(struct a b)
7
{
8
  /* The error messages here are different between C and C++, so just
9
     make sure we get an error.  */
10
  float x = __real b;           /* { dg-error "" } */
11
  float y = __imag b;           /* { dg-error "" } */
12
  return x / y;
13
}
14
int f1(int *b)
15
{
16
  float x = __imag b;           /* { dg-error "wrong type argument" } */
17
  float y = __real b;           /* { dg-error "wrong type argument" } */
18
  return x - y;
19
}

powered by: WebSVN 2.1.0

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