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
+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
&& (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
--- /dev/null
+/* { 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();
+}