blob: a8936c4cb6507108c6727b830ca8d3eeb549cac8 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* Ensure that we don't crash when people decide to return the address of padding. */
struct A
{
char c;
int i;
};
A a;
struct B
{
char c, d;
};
union C
{
A *p;
B *q;
C() : p(&a) {}
char& foo() { return q->d; }
};
void bar() { C().foo() = 0; }