summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0183-PR-debug-48768.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0183-PR-debug-48768.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0183-PR-debug-48768.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0183-PR-debug-48768.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0183-PR-debug-48768.patch
new file mode 100644
index 000000000..609f11043
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0183-PR-debug-48768.patch
@@ -0,0 +1,81 @@
+From 8a0e77485c3d9d34c6f65cec908829dcc4cd5fee Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 26 Apr 2011 13:47:13 +0000
+Subject: [PATCH 183/200] PR debug/48768
+ * tree-ssa.c (insert_debug_temp_for_var_def): If degenerate_phi_result
+ is error_mark_node, set value to NULL.
+
+ * gcc.dg/pr48768.c: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172970 138bc75d-0d04-0410-961f-82ee72b054a4
+
+index 566f02e..a4e5470 100644
+new file mode 100644
+index 0000000..7d0383e
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr48768.c
+@@ -0,0 +1,38 @@
++/* PR debug/48768 */
++/* { dg-do compile } */
++/* { dg-options "-O -fcompare-debug" } */
++
++int a, b;
++
++int
++bar (void)
++{
++ int i, j = 1;
++ for (i = 0; i != 10; i++)
++ {
++ lab:
++ if (i)
++ {
++ int *k = &j;
++ }
++ else if (j)
++ goto lab;
++ }
++ return 1;
++}
++
++inline int
++foo (int x)
++{
++ unsigned int c = x;
++ int d = x;
++ if (bar ())
++ for (; c; c++)
++ while (x >= 0)
++ if (foo (d) >= 0)
++ {
++ d = bar ();
++ a = b ? b : 1;
++ }
++ return 0;
++}
+diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
+index eaf3ef9..da6cc9b 100644
+--- a/gcc/tree-ssa.c
++++ b/gcc/tree-ssa.c
+@@ -1,5 +1,5 @@
+ /* Miscellaneous SSA utility functions.
+- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
++ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
+ Free Software Foundation, Inc.
+
+ This file is part of GCC.
+@@ -352,6 +352,10 @@ insert_debug_temp_for_var_def (gimple_stmt_iterator *gsi, tree var)
+ value = degenerate_phi_result (def_stmt);
+ if (value && walk_tree (&value, find_released_ssa_name, NULL, NULL))
+ value = NULL;
++ /* error_mark_node is what fixup_noreturn_call changes PHI arguments
++ to. */
++ else if (value == error_mark_node)
++ value = NULL;
+ }
+ else if (is_gimple_assign (def_stmt))
+ {
+--
+1.7.0.4
+