summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.brendan/crash39.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash39.C33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C
new file mode 100644
index 000000000..392c0a009
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash39.C
@@ -0,0 +1,33 @@
+// { dg-do assemble }
+// { dg-options "-w" }
+// GROUPS passed old-abort
+//#include <GetOpt.h>
+#include <stdio.h>
+
+class GetOpt
+{
+private:
+ static char *nextchar;
+ enum OrderingEnum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER };
+ OrderingEnum ordering;
+ static int first_nonopt;
+ static int last_nonopt;
+ void exchange (char **argv);
+public:
+ char *optarg;
+ int optind;
+ int opterr;
+
+ int nargc;
+ char **nargv;
+ const char *noptstring;
+
+ GetOpt (int argc, char **argv, const char *optstring);
+ int operator () (void);
+};
+//end <GetOpt.h>
+#include <string>
+
+class foo {public: foo () {}};
+class bar {public: bar (const foo& dflt);};
+class baz: public bar {public: baz (): bar (foo ()) {}};