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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [transparent-union-3.c] - Blame information for rev 853

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

Line No. Rev Author Line
1 149 jeremybenn
/* Test for ICEs on invalid transparent unions (empty or no named
2
   members).  Bug 21213.  */
3
/* Origin: Joseph Myers <joseph@codesourcery.com> */
4
/* { dg-do compile } */
5
/* { dg-options "" } */
6
 
7
enum e { A };
8
 
9
union __attribute__((__transparent_union__)) ue1 { enum e; }; /* { dg-warning "warning: declaration does not declare anything" } */
10
/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 9 } */
11
union ue2 { enum e; } __attribute__((__transparent_union__)); /* { dg-warning "warning: declaration does not declare anything" } */
12
/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 11 } */
13
 
14
union __attribute__((__transparent_union__)) ui1 { int; }; /* { dg-warning "warning: declaration does not declare anything" } */
15
/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 14 } */
16
union ui2 { int; } __attribute__((__transparent_union__)); /* { dg-warning "warning: declaration does not declare anything" } */
17
/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 16 } */
18
 
19
union __attribute__((__transparent_union__)) u1 { };
20
/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 19 } */
21
union u2 { } __attribute__((__transparent_union__));
22
/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 21 } */

powered by: WebSVN 2.1.0

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