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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [cond-constqual-1.c] - Rev 801

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

/* Test for const qualification of type of conditional expression.  */
/* { dg-do compile } */
/* { dg-options "" } */
 
int foo (int) __attribute__ ((const));
const int i;
 
void
test (void)
{
  __typeof__ (1 ? foo (0) : 0) texpr;
  __typeof__ (1 ? i : 0) texpr2;
  texpr = 0;  /* { dg-bogus "read-only variable" "conditional expression with call to const function" } */
  texpr2 = 0; /* { dg-error "read-only variable" "conditional expression with const variable" } */
}
 

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

powered by: WebSVN 2.1.0

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