aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/pr119139.d
blob: dc42c411e3904642c9f7acdebd74873106fb3b7a (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
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119139
// { dg-do compile }
// { dg-options "-fdump-tree-gimple" }
string toString()
{
    return "1";
}

struct B
{
    ulong n;

    invariant{}

    string str()
    {
        if (n == 0)
        {
            return "0";
        }
        return toString();
    }
}
// { dg-final { scan-tree-dump-not "static const struct  __result =" "gimple" } }