From f5c2cacaad0d670aee9993c31c0eb93887e49d33 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Wed, 27 Feb 2013 08:26:53 +0100
Subject: [PATCH] re PR target/56455 (ICE in final_scan_insn)

	PR target/56455
	* stmt.c (expand_switch_as_decision_tree_p): If flag_pic
	and ASM_OUTPUT_ADDR_DIFF_ELT isn't defined, return true.

From-SVN: r196304
---
 gcc/ChangeLog | 6 ++++++
 gcc/stmt.c    | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2bee7d99eec1..c9d00d6298bd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-02-27  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/56455
+	* stmt.c (expand_switch_as_decision_tree_p): If flag_pic
+	and ASM_OUTPUT_ADDR_DIFF_ELT isn't defined, return true.
+
 2013-02-26  Jakub Jelinek  <jakub@redhat.com>
 
 	PR middle-end/56461
diff --git a/gcc/stmt.c b/gcc/stmt.c
index c5ba10b69fa8..ca58786c43ca 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1760,6 +1760,10 @@ expand_switch_as_decision_tree_p (tree range,
     return true;
   if (!flag_jump_tables)
     return true;
+#ifndef ASM_OUTPUT_ADDR_DIFF_ELT
+  if (flag_pic)
+    return true;
+#endif
 
   /* If the switch is relatively small such that the cost of one
      indirect jump on the target are higher than the cost of a
-- 
GitLab