]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/test17399.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / test17399.d
1 /* REQUIRED_ARGS: -inline
2 */
3
4 // https://issues.dlang.org/show_bug.cgi?id=17399
5
6 pragma(inline, true)
7 uint addu(uint x, uint y, ref bool overflow) {
8 uint r = x + y;
9 if (r < x || r < y)
10 overflow = true;
11 return r;
12 }
13
14 void foo() {
15 uint a, b;
16 bool over;
17 addu(a, b, over);
18 }