Tested x86_64-pc-linux-gnu, applying to trunk.
-- 8< --
In the PR118629 testcase, pushdecl_outermost_localscope was failing and
returning error_mark_node without ever actually giving an error; in addition
to my earlier fix for the failure, make sure failures aren't silent.
gcc/cp/ChangeLog:
* decl.cc (cp_make_fname_decl): Prevent silent failure.
---
gcc/cp/decl.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index 4e97093b134..84398e5952a 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -5339,6 +5339,8 @@ cp_make_fname_decl (location_t loc, tree id, int type_dep)
decl = pushdecl_outermost_localscope (decl);
if (decl != error_mark_node)
add_decl_expr (decl);
+ else
+ gcc_assert (seen_error ());
}
else
{
base-commit: 47b62be9cace0e2e124650f331788d52ffd5fb25
--
2.49.0