summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/inline5.C
blob: dd61ee6bc012e824633cea4795c4a9ec48ec042e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/12519

// { dg-do compile }
// { dg-options "-O" }

struct A
{
    ~A();
};

inline const A foo()
{
    A a;
    return a;
}

A bar()
{
    return foo();
}