aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2020-12-03 15:54:14 +0100
committerEric Botcazou <ebotcazou@adacore.com>2020-12-03 15:56:34 +0100
commit277ff3406d533990e98cf1c2075b9dc9db6fa48a (patch)
tree229f7a096f2dd52560f46bffe6849a5fba6d7676 /gcc/expmed.c
parent5d103763b9bc6a998dd4a453861663b229d7a24a (diff)
downloadgcc-277ff3406d533990e98cf1c2075b9dc9db6fa48a.zip
gcc-277ff3406d533990e98cf1c2075b9dc9db6fa48a.tar.gz
gcc-277ff3406d533990e98cf1c2075b9dc9db6fa48a.tar.bz2
Fix PR middle-end/98099
this replaces the ICE by a sorry message for the use of reverse scalar storage order with 128-bit decimal floating-point type on 32-bit targets. gcc/ChangeLog: PR middle-end/98099 * expmed.c (flip_storage_order): In the case of a non-integer mode, sorry out if the integer mode to be used instead is not supported. gcc/testsuite/ChangeLog: * gcc.dg/pr98099.c: New test.
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index ce88f32..0d600bd 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -412,7 +412,8 @@ flip_storage_order (machine_mode mode, rtx x)
&& __builtin_expect (reverse_float_storage_order_supported < 0, 0))
check_reverse_float_storage_order_support ();
- if (!int_mode_for_size (GET_MODE_PRECISION (mode), 0).exists (&int_mode))
+ if (!int_mode_for_size (GET_MODE_PRECISION (mode), 0).exists (&int_mode)
+ || !targetm.scalar_mode_supported_p (int_mode))
{
sorry ("reverse storage order for %smode", GET_MODE_NAME (mode));
return x;