OSDN Git Service

PR target/56455
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Feb 2013 07:26:53 +0000 (07:26 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Feb 2013 07:26:53 +0000 (07:26 +0000)
* stmt.c (expand_switch_as_decision_tree_p): If flag_pic
and ASM_OUTPUT_ADDR_DIFF_ELT isn't defined, return true.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196304 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/stmt.c

index 2bee7d9..c9d00d6 100644 (file)
@@ -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
index c5ba10b..ca58786 100644 (file)
@@ -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