aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-03-30 02:55:23 +0000
committerRichard Stallman <rms@gnu.org>1992-03-30 02:55:23 +0000
commitc4fcf531ae0b236cf8ba7b3f664da08e858bfc89 (patch)
treec1c0916a9d721ca778b3da049fd34f635e307b9d /gcc
parent77395be632139b8dcba8b3491ed4f91350721e19 (diff)
downloadgcc-c4fcf531ae0b236cf8ba7b3f664da08e858bfc89.zip
gcc-c4fcf531ae0b236cf8ba7b3f664da08e858bfc89.tar.gz
gcc-c4fcf531ae0b236cf8ba7b3f664da08e858bfc89.tar.bz2
*** empty log message ***
From-SVN: r632
Diffstat (limited to 'gcc')
-rw-r--r--gcc/stmt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 6d5e848..7446664 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -3650,15 +3650,19 @@ expand_end_case (orig_index)
#ifdef HAVE_casesi
if (HAVE_casesi)
{
+ enum machine_mode index_mode = SImode;
+ tree index_type = GET_MODE_BITSIZE (index_mode);
+
/* Convert the index to SImode. */
- if (TYPE_MODE (TREE_TYPE (index_expr)) == DImode)
+ if (GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (index_expr)))
+ > GET_MODE_BITSIZE (index_mode))
{
index_expr = build (MINUS_EXPR, TREE_TYPE (index_expr),
index_expr, minval);
minval = integer_zero_node;
}
- if (TYPE_MODE (TREE_TYPE (index_expr)) != SImode)
- index_expr = convert (type_for_size (GET_MODE_BITSIZE (SImode), 0),
+ if (TYPE_MODE (TREE_TYPE (index_expr)) != index_mode)
+ index_expr = convert (type_for_size (index_type, 0),
index_expr);
index = expand_expr (index_expr, 0, VOIDmode, 0);
emit_queue ();