summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/anon-struct-15.c
blob: d9e786a8d86bc26fa8a57f89a8677f1e8c67fbf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Test diagnostics for duplicate field names involving anonymous
   struct or union as first field.  PR 46889.  */
/* { dg-do compile } */
/* { dg-options "" } */

struct foo {
  union {
    struct {
      unsigned long time_stamp;
    };
    struct {
      int *page;
    };
  };
  int *page; /* { dg-error "duplicate member" } */
};