aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/pr45310.C
blob: 335c782570f4972af95a680a341fa584af05fe30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* { dg-do compile } */
/* { dg-options "-O1 -fnon-call-exceptions" }  */

static inline const int &
max (const int &a, const int &b)
{
  return a ? a : b;
}

static inline int
baz ()
{
  return max (0, 0);
}

struct S
{
  ~S ()
  {
    baz ();
  }
};

void bar ();
void
foo ()
{
  S s;
  bar ();
}