aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/test17399.d
blob: 98d22ef17b90a89fdc8a2b5bde1258e7407012ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* REQUIRED_ARGS: -inline
 */

// https://issues.dlang.org/show_bug.cgi?id=17399

pragma(inline, true)
uint addu(uint x, uint y, ref bool overflow) {
    uint r = x + y;
    if (r < x || r < y)
        overflow = true;
    return r;
}

void foo() {
    uint a, b;
    bool over;
    addu(a, b, over);
}