summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/20010113-1.c
blob: 35b7c1f1d7ed57f46e68f293e70a08223833c6a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Origin: PR c/364 from and@genesyslab.com, very much reduced to a
   testcase by Joseph Myers <jsm28@cam.ac.uk>.

   The initializer of z is a valid address constant, and GCC 2.95.2
   accepts it as such.  CVS GCC as of 2001-01-13 rejects it, but accepts
   it if y is changed to x in the initializer.  */

struct {
  struct {
    int x;
    int y;
  } p;
} v;

int *z = &((&(v.p))->y);