From f970e7c9c9447b1c6c5839203ab658bb018aea99 Mon Sep 17 00:00:00 2001 From: Giovanni Bajo Date: Sat, 7 Feb 2004 02:11:10 +0000 Subject: [PATCH] re PR c++/14033 (tree check: expected class 't', have 'x' (error_mark) in initialize_inlined_parameters, at tree-inline.c:829) PR c++/14033 * g++.dg/other/crash-2.C: New test. From-SVN: r77437 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/other/crash-2.C | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 gcc/testsuite/g++.dg/other/crash-2.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 899dc70ea35..d64a333bb18 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-02-06 Giovanni Bajo + + PR c++/14033 + * g++.dg/other/crash-2.C: New test. + 2003-02-06 Giovanni Bajo PR c++/14028 diff --git a/gcc/testsuite/g++.dg/other/crash-2.C b/gcc/testsuite/g++.dg/other/crash-2.C new file mode 100644 index 00000000000..3a19f3ba8ab --- /dev/null +++ b/gcc/testsuite/g++.dg/other/crash-2.C @@ -0,0 +1,13 @@ +// { dg-do compile } +// { dg-options "-finline -finline-functions" } +// Contributed by Hans Buchmann +// 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()); +} -- 2.30.2