Commit 1ade64c9 by H.J. Lu Committed by H.J. Lu

DWARF: Call set_indirect_string on DW_MACINFO_start_file

Since -gsplit-dwarf -g3 will output filename as indirect string, call
set_indirect_string on DW_MACINFO_start_file for -gsplit-dwarf -g3.

gcc/

	PR debug/79342
	* dwarf2out.c (save_macinfo_strings): Call set_indirect_string
	on DW_MACINFO_start_file for -gsplit-dwarf -g3.

gcc/testsuite/

	PR debug/79342
	* gcc.dg/pr79342.: New test.

From-SVN: r263831
parent e144a2b3
2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
PR debug/79342
* dwarf2out.c (save_macinfo_strings): Call set_indirect_string
on DW_MACINFO_start_file for -gsplit-dwarf -g3.
2018-08-24 Richard Biener <rguenther@suse.de>
* cfg.h (struct control_flow_graph): Add edge_flags_allocated and
......
......@@ -28287,6 +28287,12 @@ save_macinfo_strings (void)
&& (debug_str_section->common.flags & SECTION_MERGE) != 0)
set_indirect_string (find_AT_string (ref->info));
break;
case DW_MACINFO_start_file:
/* -gsplit-dwarf -g3 will also output filename as indirect
string. */
if (!dwarf_split_debug_info)
break;
/* Fall through. */
case DW_MACRO_define_strp:
case DW_MACRO_undef_strp:
set_indirect_string (find_AT_string (ref->info));
......
2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
PR debug/79342
* gcc.dg/pr79342.: New test.
2018-08-23 Martin Sebor <msebor@redhat.com>
PR tree-optimization/87072
......
/* { dg-do compile } */
/* { dg-options "-O2 -gsplit-dwarf -g3" } */
/* { dg-additional-options "-march=skylake -mrtm -mabm" { target x86_64-*-* i?86-*-* } } */
int a;
void b(void);
void e(int *);
int f(void);
void
c(void)
{
int d;
e(&d);
if (f())
b();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment