aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-01-30 14:49:44 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2012-01-30 14:49:44 +0100
commit2026d51a4165a6eef50a80fc3370490d5e5ee442 (patch)
tree51e742f2f8ac2470df8bd3451262a4ccd506bba3
parent2f32669918c6422f072b3b648809b792b5b909f6 (diff)
downloadgcc-2026d51a4165a6eef50a80fc3370490d5e5ee442.zip
gcc-2026d51a4165a6eef50a80fc3370490d5e5ee442.tar.gz
gcc-2026d51a4165a6eef50a80fc3370490d5e5ee442.tar.bz2
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
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/dwarf2out.c3
-rw-r--r--gcc/testsuite/ChangeLog3
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/pr52027.c19
4 files changed, 28 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c819d1d..e498f7b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2012-01-30 Jakub Jelinek <jakub@redhat.com>
+ PR debug/52027
+ * dwarf2out.c (dwarf2out_switch_text_section): Don't call
+ set_cur_line_info_table if not emitting debug info.
+
PR tree-optimization/52046
* tree-vect-patterns.c (check_bool_pattern): Give up if
a comparison could throw.
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
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 36dab8f..d80e3ab 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,8 @@
2012-01-30 Jakub Jelinek <jakub@redhat.com>
+ PR debug/52027
+ * gcc.dg/tree-prof/pr52027.c: New test.
+
PR tree-optimization/52046
* gcc.dg/pr52046.c: New test.
diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr52027.c b/gcc/testsuite/gcc.dg/tree-prof/pr52027.c
new file mode 100644
index 0000000..c12f8b4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/pr52027.c
@@ -0,0 +1,19 @@
+/* PR debug/52027 */
+/* { dg-require-effective-target freorder } */
+/* { dg-options "-O -freorder-blocks-and-partition -fno-reorder-functions" } */
+
+void
+foo (int len)
+{
+ char array[1000];
+ __builtin_memset (array, 0, len);
+}
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 1000; i++)
+ foo (8);
+ return 0;
+}