summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr60784.c
blob: 82b512f7c2ecf8acb68d73f0b81a8059416e16b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* PR c/60784 */
/* { dg-do compile } */
/* { dg-options "-Wextra -std=c99" } */

struct A { int i, j; };
struct B { struct A a; } b1 = { .a.i = 1, .a.j = 1 };
struct B b2 = { .a.i = 1 };

struct C { struct { int a, b; }; } c1 = { .a = 4, .b = 2 };
struct C c2 = { .a = 4, .b = 2 };

struct D { struct A a; };
struct E { struct D d; };
struct F { struct E e; } f1 = { .e.d.a.i = 8 };
struct F f2 = { .e.d.a.i = 8, .e.d.a.j = 3 };

struct G {
  struct {
    struct {
      struct {
        int a, b, c, d, e, f;
      };
    };
  };
} g = { .b = 2 };