re PR debug/14718 (ICE in force_decl_die (dwarf2out.c))
authorGraham Stott <graham.stott@btinternet.com>
Mon, 3 May 2004 13:13:15 +0000 (13:13 +0000)
committerGraham Stott <grahams@gcc.gnu.org>
Mon, 3 May 2004 13:13:15 +0000 (13:13 +0000)
PR 14718
* dwarf2out.c (dwarf2out_imported_module_or_decl): Use
force_type_die for CONST_DECL.

From-SVN: r81431

gcc/ChangeLog
gcc/dwarf2out.c

index bb21d0c49ef7b338588b207723b856f5818e4f13..a80c5faaddeba646373b44efffe8cdbca3ac4a23 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-03  Graham Stott  <graham.stott@btinternet.com>
+
+       PR 14718
+       * dwarf2out.c (dwarf2out_imported_module_or_decl): Use
+       force_type_die for CONST_DECL.
+
 2004-05-03  Eric Botcazou  <ebotcazou@libertysurf.fr>
             Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
index 7f234eebfd249f43f66ac048a16ff39204e11406..7af0eb348531783c4479f4f6e1f349a52657a085 100644 (file)
@@ -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);