diff options
author | Devang Patel <dpatel@apple.com> | 2003-10-06 15:25:19 -0700 |
---|---|---|
committer | Devang Patel <dpatel@gcc.gnu.org> | 2003-10-06 15:25:19 -0700 |
commit | 8a7a6f4ded855d2fc07bc9c331b1058594bbe479 (patch) | |
tree | 3394bf2be8f58b06adeaa9ec44b6beb09ec8665c /gcc/dwarf2out.c | |
parent | 9a557707dd303a741f5a329b5b2be232794e11f1 (diff) | |
download | gcc-8a7a6f4ded855d2fc07bc9c331b1058594bbe479.zip gcc-8a7a6f4ded855d2fc07bc9c331b1058594bbe479.tar.gz gcc-8a7a6f4ded855d2fc07bc9c331b1058594bbe479.tar.bz2 |
Fix -feliminate-dwarf2-dups ICE.
gcc
* dwarf2out.c (is_main_source): Remove variable.
(dwarf2out_start_source_file): Do not check is_main_source.
Do not reset is_main_source.
(dwarf2out_init): Do not initialize is_main_source.
testsuite
* gcc.dg/debug/dwarf2-3.h: New test.
* gcc.dg/debug/dwarf2-3.c: New test case for -feliminate-dwarf2-dups.
From-SVN: r72166
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 9a23c76..2642e81 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3443,12 +3443,6 @@ static unsigned long next_die_offset; /* Record the root of the DIE's built for the current compilation unit. */ static GTY(()) dw_die_ref comp_unit_die; -#ifdef DWARF2_DEBUGGING_INFO -/* We need special handling in dwarf2out_start_source_file if it is - first one. */ -static int is_main_source; -#endif - /* A list of DIEs with a NULL parent waiting to be relocated. */ static GTY(()) limbo_die_node *limbo_die_list; @@ -12285,7 +12279,7 @@ dwarf2out_source_line (unsigned int line, const char *filename) static void dwarf2out_start_source_file (unsigned int lineno, const char *filename) { - if (flag_eliminate_dwarf2_dups && !is_main_source) + if (flag_eliminate_dwarf2_dups) { /* Record the beginning of the file for break_out_includes. */ dw_die_ref bincl_die; @@ -12294,8 +12288,6 @@ dwarf2out_start_source_file (unsigned int lineno, const char *filename) add_AT_string (bincl_die, DW_AT_name, filename); } - is_main_source = 0; - if (debug_info_level >= DINFO_LEVEL_VERBOSE) { named_section_flags (DEBUG_MACINFO_SECTION, SECTION_DEBUG); @@ -12396,7 +12388,6 @@ dwarf2out_init (const char *filename ATTRIBUTE_UNUSED) invoked when the given (base) source file was compiled. We will fill in this value in dwarf2out_finish. */ comp_unit_die = gen_compile_unit_die (NULL); - is_main_source = 1; VARRAY_TREE_INIT (incomplete_types, 64, "incomplete_types"); |