repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
nullptr42.C
blob
2fb628df6d7bc7fec10caa117b1dcdd8a77d22fb
1
// PR c++/90473 - wrong code with nullptr in default argument.
2
// { dg-do run { target c++11 } }
3
4
int g;
5
void f() { g++; }
6
7
void fn1 (void* p = (f(), nullptr)) { }
8
void fn2 (int p = (f(), 0)) { }
9
10
int main()
11
{
12
fn1 ();
13
if (g != 1)
14
__builtin_abort ();
15
fn2 ();
16
if (g != 2)
17
__builtin_abort ();
18
}