diff options
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/expmed.h | 15 |
2 files changed, 19 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8405b2e..95a324c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-01-27 Jakub Jelinek <jakub@redhat.com> + + PR bootstrap/59934 + * expmed.h (expmed_mode_index): Rework so that analysis and optimziers + know when the MODE_PARTIAL_INT and MODE_VECTOR_INT cases can never be + reached. + 2014-01-27 James Greenhalgh <james.greenhalgh@arm.com> * common/config/arm/arm-common.c diff --git a/gcc/expmed.h b/gcc/expmed.h index 9681e41..4d01d1f 100644 --- a/gcc/expmed.h +++ b/gcc/expmed.h @@ -221,12 +221,21 @@ expmed_mode_index (enum machine_mode mode) case MODE_INT: return mode - MIN_MODE_INT; case MODE_PARTIAL_INT: - return mode - MIN_MODE_PARTIAL_INT + NUM_MODE_INT; + /* If there are no partial integer modes, help the compiler + to figure out this will never happen. See PR59934. */ + if (MIN_MODE_PARTIAL_INT != VOIDmode) + return mode - MIN_MODE_PARTIAL_INT + NUM_MODE_INT; + break; case MODE_VECTOR_INT: - return mode - MIN_MODE_VECTOR_INT + NUM_MODE_IP_INT; + /* If there are no vector integer modes, help the compiler + to figure out this will never happen. See PR59934. */ + if (MIN_MODE_VECTOR_INT != VOIDmode) + return mode - MIN_MODE_VECTOR_INT + NUM_MODE_IP_INT; + break; default: - gcc_unreachable (); + break; } + gcc_unreachable (); } /* Return a pointer to a boolean contained in EOC indicating whether |