summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/t42.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/t42.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/t42.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/t42.C b/gcc/testsuite/g++.old-deja/g++.pt/t42.C
new file mode 100644
index 000000000..ca76d5218
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/t42.C
@@ -0,0 +1,18 @@
+// { dg-do run }
+extern "C" void abort ();
+
+struct A {
+ struct stat {
+ int x;
+ stat (int j) { abort (); }
+ };
+ static int stat (double d) { return 0; } // { dg-bogus "" } cfront takes it
+ static int zap () {
+ stat (0);
+ return stat (1); // { dg-bogus "" } this should work
+ }
+};
+
+int main () {
+ return A::zap ();
+}