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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [noncompile/] [20020207-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* This testcase ICEd because statement expression type was set, but was not
2
   as used.  */
3
 
4
struct A {
5
  unsigned int a, b, c;
6
};
7
 
8
extern void abort (void);
9
extern void exit (int);
10
 
11
struct A bar (void)
12
{
13
  return (struct A) { 176, 52, 31 };
14
}
15
 
16
void baz (struct A *a)
17
{
18
  if (a->a != 176 || a->b != 52 || a->c != 31)
19
    abort ();
20
}
21
 
22
int main ()
23
{
24
  struct A d;
25
 
26
  d = ({ { bar (); } });                /* { dg-error "void value" } */
27
  d = ({ if (1) { bar (); } });         /* { dg-error "void value" } */
28
  d = ({ while (0) { bar (); } });       /* { dg-error "void value" } */
29
  d = ({ do { bar (); } while (0); });   /* { dg-error "void value" } */
30
  baz (&d);
31
  exit (0);
32
}

powered by: WebSVN 2.1.0

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