[PATCH] ARM: reset arm_fp16_format

Martin Liška mliska@suse.cz
Tue Jun 1 14:05:57 GMT 2021


Hello.

The patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98636#c20 where
target option restore can be called and arm_fp16_format should be reset
to ARM_FP16_FORMAT_NONE.

It fixes the ICE in the PR.

Can please ARM folks test me the patch on a Arm machine?
Thanks,
Martin

gcc/ChangeLog:

	PR target/98636
	* config/arm/arm.c (arm_option_reconfigure_globals): Reset
	the option if isa_bit_fp16 is not set.
---
  gcc/config/arm/arm.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 7b37e1b602c..4543f3c6b55 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3765,6 +3765,8 @@ arm_option_reconfigure_globals (void)
  	error ("selected fp16 options are incompatible");
        arm_fp16_format = ARM_FP16_FORMAT_IEEE;
      }
+  else
+    arm_fp16_format = ARM_FP16_FORMAT_NONE;
  
    arm_arch_cde = 0;
    arm_arch_cde_coproc = 0;
-- 
2.31.1



More information about the Gcc-patches mailing list