summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/upcast-1.c
blob: 12c2b91ba08d8cfaacc64db3e97e30a300f4a8dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { do-go compile } */
/* { dg-options "-fdump-tree-gimple" } */

typedef struct { int i; } Foo;
Foo foo;
Foo *bar(void)
{
  return (Foo *)&foo.i;
}

/* { dg-final { scan-tree-dump "&foo;" "gimple" } } */
/* { dg-final { cleanup-tree-dump "gimple" } } */