]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/nullptr42.C
tree-optimization/115629 - missed tail merging
[gcc.git] / gcc / testsuite / g++.dg / cpp0x / nullptr42.C
CommitLineData
cb0a83f3
MP
1// PR c++/90473 - wrong code with nullptr in default argument.
2// { dg-do run { target c++11 } }
3
4int g;
5void f() { g++; }
6
7void fn1 (void* p = (f(), nullptr)) { }
8void fn2 (int p = (f(), 0)) { }
9
10int main()
11{
12 fn1 ();
13 if (g != 1)
14 __builtin_abort ();
15 fn2 ();
16 if (g != 2)
17 __builtin_abort ();
18}
This page took 3.938733 seconds and 6 git commands to generate.