mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-29 10:54:04 +08:00
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.
This commit is contained in:
parent
5d103763b9
commit
277ff3406d
@ -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;
|
||||
|
12
gcc/testsuite/gcc.dg/pr98099.c
Normal file
12
gcc/testsuite/gcc.dg/pr98099.c
Normal file
@ -0,0 +1,12 @@
|
||||
/* PR middle-end/98099 */
|
||||
/* Reported by G. Steinmetz <gscfq@t-online.de> */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fsso-struct=big-endian" } */
|
||||
|
||||
struct S { _Decimal128 a; };
|
||||
|
||||
_Decimal128 f (struct S x)
|
||||
{
|
||||
return x.a; /* { dg-message "sorry, unimplemented: reverse storage order" "" { target { ! int128 } } } */
|
||||
}
|
Loading…
Reference in New Issue
Block a user