OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [pr13804-1.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* Diagnostics for attempts to access a member not in a structure or
2
   union should name the type involved.  Bug 13804.  */
3
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
4
/* { dg-do compile } */
5
/* { dg-options "" } */
6
 
7
struct s0 { int a; };
8
union u0 { long b; };
9
typedef struct s0 S0;
10
typedef union u0 U0;
11
 
12
struct s0 x0;
13
S0 x1;
14
union u0 x2;
15
U0 x3;
16
struct s0 *x4;
17
union u0 *x5;
18
 
19
void
20
f (void)
21
{
22
  x0.c; /* { dg-error "error: 'struct s0' has no member named 'c'" } */
23
  x1.c; /* { dg-error "error: 'S0' has no member named 'c'" } */
24
  x2.c; /* { dg-error "error: 'union u0' has no member named 'c'" } */
25
  x3.c; /* { dg-error "error: 'U0' has no member named 'c'" } */
26
  x4->c; /* { dg-error "error: 'struct s0' has no member named 'c'" } */
27
  x5->c; /* { dg-error "error: 'union u0' has no member named 'c'" } */
28
}

powered by: WebSVN 2.1.0

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