diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.bugs/900324_02.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.bugs/900324_02.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900324_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900324_02.C new file mode 100644 index 00000000000..56ff7b738d1 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.bugs/900324_02.C @@ -0,0 +1,18 @@ +// g++ 1.37.1 bug 900324_02 + +// The following erroreous code causes g++ to segfault. + +// Cfront 2.0 passes this test. + +// keywords: segfault, function pointer, conditional operator ?: + +void function_0 (int i) { } + +void (*fp)(void); + +void function_1 () +{ + fp = 1 ? function_0 : fp; // ERROR - +} + +int main () { return 0; } |