Debian Codegraph @

gcc/testsuite/gcc.dg/pr123018.c

raw
1 /* PR c/123018 */
2 /* { dg-do compile } */
3
4 struct A {
5 int x : 8 __attribute__ ((vector_size (8))); /* { dg-error "bit-field 'x' has invalid type" } */
6 };
7 struct B {
8 float x : 8; /* { dg-error "bit-field 'x' has invalid type" } */
9 };
10 struct C {
11 int : 8 __attribute__ ((vector_size (8))); /* { dg-error "bit-field '\[^\n\r]*anonymous\[^\n\r]*' has invalid type" } */
12 int x;
13 };
14 struct D {
15 float : 8; /* { dg-error "bit-field '\[^\n\r]*anonymous\[^\n\r]*' has invalid type" } */
16 int x;
17 };