From 2026d51a4165a6eef50a80fc3370490d5e5ee442 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 30 Jan 2012 14:49:44 +0100 Subject: re PR debug/52027 (ICE: SIGSEGV in set_cur_line_info_table (dwarf2out.c:20428) with -O -freorder-blocks-and-partition -fno-reorder-functions -fprofile-use) PR debug/52027 * dwarf2out.c (dwarf2out_switch_text_section): Don't call set_cur_line_info_table if not emitting debug info. * gcc.dg/tree-prof/pr52027.c: New test. From-SVN: r183725 --- gcc/dwarf2out.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index fee5c60..f710239 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -1177,7 +1177,8 @@ dwarf2out_switch_text_section (void) var_location_switch_text_section (); - set_cur_line_info_table (sect); + if (cold_text_section != NULL) + set_cur_line_info_table (sect); } /* And now, the subset of the debugging information support code necessary -- cgit v1.1