diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4e271ed8073..2ea2497c2c2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-05-24 Steven Bosscher + + PR target/27571 + * config/alpha/alpha.c (alpha_does_function_need_gp): Skip jump + table data. + 2006-05-25 Mark Mitchell PR c++/20103 diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 6b1cef70bb0..1a3cf830f6b 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 c55a9ecfb34..320143915b3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2006-05-24 Falk Hueffner + + * gcc.c-torture/compile/pr27571.c: New test. + 2006-05-26 Paul Thomas 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 00000000000..af66369c2c4 --- /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++; + } +}