annotate gcc/testsuite/gcc.dg/transparent-union-3.c @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Test for ICEs on invalid transparent unions (empty or no named
kono
parents:
diff changeset
2 members). Bug 21213. */
kono
parents:
diff changeset
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
kono
parents:
diff changeset
4 /* { dg-do compile } */
kono
parents:
diff changeset
5 /* { dg-options "" } */
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 enum e { A };
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 union __attribute__((__transparent_union__)) ue1 { enum e; }; /* { dg-warning "declaration does not declare anything" "not anything" } */
kono
parents:
diff changeset
10 /* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } .-1 } */
kono
parents:
diff changeset
11 union ue2 { enum e; } __attribute__((__transparent_union__)); /* { dg-warning "declaration does not declare anything" "not anything" } */
kono
parents:
diff changeset
12 /* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } .-1 } */
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 union __attribute__((__transparent_union__)) ui1 { int; }; /* { dg-warning "declaration does not declare anything" "not anything" } */
kono
parents:
diff changeset
15 /* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } .-1 } */
kono
parents:
diff changeset
16 union ui2 { int; } __attribute__((__transparent_union__)); /* { dg-warning "declaration does not declare anything" "no anything" } */
kono
parents:
diff changeset
17 /* { dg-warning "union cannot be made transparent" "cannot" { target *-*-* } .-1 } */
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 union __attribute__((__transparent_union__)) u1 { };
kono
parents:
diff changeset
20 /* { dg-warning "union cannot be made transparent" "" { target *-*-* } .-1 } */
kono
parents:
diff changeset
21 union u2 { } __attribute__((__transparent_union__));
kono
parents:
diff changeset
22 /* { dg-warning "union cannot be made transparent" "" { target *-*-* } .-1 } */