aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/other/crash-2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/other/crash-2.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/other/crash-2.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/other/crash-2.C b/gcc-4.9/gcc/testsuite/g++.dg/other/crash-2.C
new file mode 100644
index 000000000..961a18a23
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/other/crash-2.C
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// { dg-options "-finline -finline-functions" }
+// Contributed by Hans Buchmann <hans dot buchmann at fhso dot ch>
+// PR c++/14033: ICE while inlining a function with incomplete parameter
+
+struct A; // { dg-error "forward declaration" }
+void foo(A a) {} // { dg-error "incomplete" }
+struct A {};
+
+void bar(void)
+{
+ foo(A());
+}