aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.brendan/crash29.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash29.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C
new file mode 100644
index 00000000000..855dd990be1
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash29.C
@@ -0,0 +1,18 @@
+// Build don't link:
+// GROUPS passed old-abort
+
+union Value
+{
+ Value(){}
+};
+
+struct GlobalAddress
+{
+ GlobalAddress(Value *nvar){}// ERROR - .*
+};// ERROR - candidates .*
+
+main()
+{
+ new GlobalAddress(Value()); // internal error occured here// ERROR - no matching function .*
+ //new GlobalAddress(new Value()); // This line is correct code
+}