aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ubsan/pr60569.C
blob: df57c06bed6ae97db23e38743b536e480cd5963d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR sanitizer/60569
// { dg-do link }
// { dg-require-effective-target lto }
// { dg-options "-fsanitize=undefined -flto" }

struct A
{
  void foo ();
  struct
  {
    int i;
    void bar () { i = 0; }
  } s;
};

void A::foo () { s.bar (); }

int
main ()
{
}