diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/null2.C')
-rwxr-xr-x | gcc/testsuite/g++.old-deja/g++.other/null2.C | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/null2.C b/gcc/testsuite/g++.old-deja/g++.other/null2.C new file mode 100755 index 0000000..9dc5b13 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/null2.C @@ -0,0 +1,12 @@ +// Based on a testcase by Eric Dumazet <Eric.Dumazet@COSMOSBAY.COM> + +#include <cstdlib> + +const char * const foo = ""; // foo is not NULL + +int main() { + if ((foo == 0) ? 0 : foo) // so this should evaluate to `foo' + return 0; + else + std::abort(); +} |