aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p7868.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.mike/p7868.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p7868.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p7868.C b/gcc/testsuite/g++.old-deja/g++.mike/p7868.C
new file mode 100644
index 00000000000..d8ce95d3c66
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p7868.C
@@ -0,0 +1,21 @@
+// Build don't link:
+// prms-id: 7868
+
+struct DIAGTYP {
+};
+struct DIAGTYP1 {
+ struct DIAGTYP;
+ void bar() { new struct DIAGTYP; } // ERROR - undefined
+ void foo() { new struct DIAGTYP1; }
+};
+
+int main () {
+ struct DIAGTYP;
+ struct DIAGTYP *lerror_desc;
+ lerror_desc= new struct DIAGTYP; // ERROR - undefined
+}
+
+void foo () {
+ struct DIAGTYP *lerror_desc;
+ lerror_desc= new struct DIAGTYP;
+}