re PR target/27571 (alpha: ICE in get_attr_usegp, at config/alpha/alpha.md:171)
authorFalk Hueffner <falk@gcc.gnu.org>
Fri, 26 May 2006 12:28:40 +0000 (14:28 +0200)
committerFalk Hueffner <falk@gcc.gnu.org>
Fri, 26 May 2006 12:28:40 +0000 (14:28 +0200)
PR target/27571
* config/alpha/alpha.c (alpha_does_function_need_gp): Skip jump
table data.

* gcc.c-torture/compile/pr27571.c: New test.

From-SVN: r114130

gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr27571.c [new file with mode: 0644]

index 4e271ed8073659653aa05f4e9e70f07711b886df..2ea2497c2c25cbda220262765794436ba194c96c 100644 (file)
@@ -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
index 6b1cef70bb015b3fe6b750559b5609dd5db7fcb1..1a3cf830f6b99f45128b1e3325e3053b3cd5d394 100644 (file)
@@ -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))
index c55a9ecfb34a7e854f388aa3280739d1d4e5a82c..320143915b36fb95c84c8ab5d1c295f8088849cd 100644 (file)
@@ -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 (file)
index 0000000..af66369
--- /dev/null
@@ -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++;
+    }
+}