modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/anon-1.c (about)

     1  /* Copyright (C) 2001 Free Software Foundation, Inc.  */
     2  
     3  /* Source: Neil Booth, 4 Nov 2001, derived from PR 2820 - field lookup in
     4     nested anonymous entities was broken.  */
     5  
     6  struct
     7  {
     8    int x;
     9    struct
    10    {
    11      int a;
    12      union
    13      {
    14        int b;
    15      };
    16    };
    17  } foo;
    18  
    19  int
    20  main(int argc, char *argv[])
    21  {
    22    foo.b = 6;
    23    foo.a = 5;
    24  
    25    if (foo.b != 6)
    26      abort ();
    27  
    28    return 0;
    29  }