summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/null2.C
blob: 3c8c50a2080ef903db8e44c7589f6bfecedce216 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do run  }
// Based on a testcase by Eric Dumazet <Eric.Dumazet@COSMOSBAY.COM>

extern "C" void abort ();

const char * const foo = ""; // foo is not NULL

int main() {
  if ((foo == 0) ? 0 : foo)  // so this should evaluate to `foo'
    return 0;
  else
    abort();
}