]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/g++.dg/cpp0x/nullptr42.C
PR c++/92590 - wrong handling of inherited default ctor.
[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 0.439765 seconds and 5 git commands to generate.