view gcc/testsuite/c-c++-common/pr33193.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR c/33193 */
/* { dg-do compile } */

struct a {float x, y; };

float f(struct a b)
{
  /* The error messages here are different between C and C++, so just
     make sure we get an error.  */
  float x = __real b;		/* { dg-error "" } */
  float y = __imag b;		/* { dg-error "" } */
  return x / y;
}
int f1(int *b)
{
  float x = __imag b;		/* { dg-error "wrong type argument" } */
  float y = __real b;		/* { dg-error "wrong type argument" } */
  return x - y;
}