aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/pr98427.d
blob: 225db8b8f2f80cdd78860c8cee1ebede32a7c12b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98427
// { dg-do compile }
// { dg-options "-O2 -fno-inline" }

@trusted memoizeExpr()
{
    struct CodepointSet
    {
        struct CowArray
        {
            uint *ptr;
        }

        const CodepointSet binary(U)(U rhs)
        {
            return rhs;
        }

        CowArray array;
    }

    CodepointSet().binary(CodepointSet());
}