Bug 14718 - [4.0 Regression] ICE in force_decl_die (dwarf2out.c)
Summary: [4.0 Regression] ICE in force_decl_die (dwarf2out.c)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Devang Patel
URL:
Keywords: ice-on-valid-code, patch
Depends on:
Blocks:
 
Reported: 2004-03-24 16:33 UTC by Falk Hueffner
Modified: 2004-10-30 21:12 UTC (History)
2 users (show)

See Also:
Host: alphaev68-unknown-linux-gnu
Target: alphaev68-unknown-linux-gnu
Build: alphaev68-unknown-linux-gnu
Known to work: 3.4.0
Known to fail: 4.0.0
Last reconfirmed: 2004-03-24 17:20:54


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Falk Hueffner 2004-03-24 16:33:43 UTC
gcc version 3.5-tree-ssa 20040311 (merged 20040307)

% cat test.c
namespace Graphics {
    enum { kTextAlignCenter };
    using Graphics::kTextAlignCenter;
}

% g++ -c -g test.c                                                             
          
test.c:3: internal compiler error: in force_decl_die, at dwarf2out.c:12321
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Andrew Pinski 2004-03-24 17:20:48 UTC
Confirmed a regression from 3.4.0.
I think this was caused by:
2004-01-27  Devang Patel <dpatel@apple.com>

        * Makefile.in (dwarf2out.o): Depend on input.h
        * dbxout.c (dbx_debug_hooks): Add new empty hook for
        imported_module_or_decl.
        (xcoff_debug_hooks): Same.
        * sdbout.c (sdb_debug_hooks): Same.
        * vmsdbgout.c (vmsdbg_debug_hooks): Same.
        * debug.c (do_nothing_debug_hooks): Same.
        (debug_nothing_tree_tree): New function.
        * debug.h (gcc_debug_hooks): New hook, imported_module_or_decl.
        * dwarf2out.c: Include input.h.
        (dwarf2_debug_hooks): Add new hook for imported_module_or_decl.
        (remove_child_TAG): New function.
        (dwarf_tag_name): Handle DW_TAG_imported_module.
        (gen_subprogram_die): Equate decl number to declaration die. Do not
        remove all children dies while reusing declaration die for definition.
        Instead, selectively remove only formal parameters.
        (gen_variable_die): Equate variable decl to declaration die.
        (gen_field_die): Equate field decl to line number.
        (force_namespace_die): Replace it with ...
        (force_decl_die): ... this.
        (force_type_die): New function.
        (setup_namespace_context): Replace use of force_namespace_die() with
        force_decl_die().
        (gen_namespace_die): Same.
        (dwarf2out_imported_module_or_decl): New function.
Comment 2 Devang Patel 2004-03-24 19:03:34 UTC
I'll take a look.
Comment 3 Andrew Pinski 2004-04-12 17:08:42 UTC
Graham Stott posted a patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-04/msg00723.html>.
Comment 4 GCC Commits 2004-05-03 13:13:21 UTC
Subject: Bug 14718

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	grahams@gcc.gnu.org	2004-05-03 13:13:16

Modified files:
	gcc            : ChangeLog dwarf2out.c 

Log message:
	PR 14718
	* dwarf2out.c (dwarf2out_imported_module_or_decl): Use
	force_type_die for CONST_DECL.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3557&r2=2.3558
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gcc&r1=1.515&r2=1.516

Comment 5 Andrew Pinski 2004-05-03 13:18:21 UTC
Fixed.