From 834eb1f02c99c7d03524e02b7dd482dc0c0e827a Mon Sep 17 00:00:00 2001 From: Graham Stott Date: Mon, 3 May 2004 13:13:15 +0000 Subject: [PATCH] re PR debug/14718 (ICE in force_decl_die (dwarf2out.c)) PR 14718 * dwarf2out.c (dwarf2out_imported_module_or_decl): Use force_type_die for CONST_DECL. From-SVN: r81431 --- gcc/ChangeLog | 6 ++++++ gcc/dwarf2out.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bb21d0c49ef..a80c5faadde 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-05-03 Graham Stott + + PR 14718 + * dwarf2out.c (dwarf2out_imported_module_or_decl): Use + force_type_die for CONST_DECL. + 2004-05-03  Eric Botcazou Rainer Orth   diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 7f234eebfd2..7af0eb34853 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -12781,8 +12781,8 @@ dwarf2out_imported_module_or_decl (tree decl, tree context) else scope_die = force_decl_die (context); - /* For TYPE_DECL, lookup TREE_TYPE. */ - if (TREE_CODE (decl) == TYPE_DECL) + /* For TYPE_DECL or CONST_DECL, lookup TREE_TYPE. */ + if (TREE_CODE (decl) == TYPE_DECL || TREE_CODE (decl) == CONST_DECL) at_import_die = force_type_die (TREE_TYPE (decl)); else at_import_die = force_decl_die (decl); -- 2.30.2