aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/alpha/alpha.c1
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr27571.c27
4 files changed, 38 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4e271ed..2ea2497 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-24 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR target/27571
+ * config/alpha/alpha.c (alpha_does_function_need_gp): Skip jump
+ table data.
+
2006-05-25 Mark Mitchell <mark@codesourcery.com>
PR c++/20103
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 6b1cef7..1a3cf83 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -7410,6 +7410,7 @@ alpha_does_function_need_gp (void)
for (; insn; insn = NEXT_INSN (insn))
if (INSN_P (insn)
+ && ! JUMP_TABLE_DATA_P (insn)
&& GET_CODE (PATTERN (insn)) != USE
&& GET_CODE (PATTERN (insn)) != CLOBBER
&& get_attr_usegp (insn))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c55a9ec..3201439 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2006-05-24 Falk Hueffner <falk@debian.org>
+
+ * gcc.c-torture/compile/pr27571.c: New test.
+
2006-05-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/27709
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr27571.c b/gcc/testsuite/gcc.c-torture/compile/pr27571.c
new file mode 100644
index 0000000..af66369
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr27571.c
@@ -0,0 +1,27 @@
+/* PR target/27571
+ alpha_does_function_need_gp did not properly skip jump table insns */
+
+int r3isseparator(int);
+void r3isdigit(int);
+void r3decimalvalue(int);
+
+void r7todouble(int *storage, int *count) {
+ int i = 0;
+ int state = 0;
+ int cc = 0;
+ while (i > *count) {
+ cc = *storage;
+ switch (state) {
+ case 0:
+ if (r3isseparator(cc))
+ state = 1;
+ case 1:
+ r3isdigit(cc);
+ case 2:
+ case 5:
+ case 6:
+ r3decimalvalue(cc);
+ }
+ i++;
+ }
+}