aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr123018.c
blob: f1f701b5675e9fda5be5512d2a55556741b41b29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* PR c/123018 */
/* { dg-do compile } */

struct A {
  int x : 8 __attribute__ ((vector_size (8)));	/* { dg-error "bit-field 'x' has invalid type" } */
};
struct B {
  float x : 8;					/* { dg-error "bit-field 'x' has invalid type" } */
};
struct C {
  int : 8 __attribute__ ((vector_size (8)));	/* { dg-error "bit-field '\[^\n\r]*anonymous\[^\n\r]*' has invalid type" } */
  int x;
};
struct D {
  float : 8;					/* { dg-error "bit-field '\[^\n\r]*anonymous\[^\n\r]*' has invalid type" } */
  int x;
};