From: Prathamesh Kulkarni Date: Fri, 22 Jan 2021 08:44:20 +0000 (+0530) Subject: arm: Fix ICE with incompatible values for -mfp16-format [PR98636]. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4e3beaca15cab2de88a68d76f0aabc68e68f678a;p=gcc.git arm: Fix ICE with incompatible values for -mfp16-format [PR98636]. gcc/ 2021-01-22 Prathamesh Kulkarni PR target/98636 * optc-save-gen.awk: Add arm_fp16_format to checked_options. gcc/testsuite/ 2021-01-22 Prathamesh Kulkarni PR target/98636 * gcc.target/arm/pr98636.c: New test. --- diff --git a/gcc/optc-save-gen.awk b/gcc/optc-save-gen.awk index b1f85928275..b9c7187a3b9 100644 --- a/gcc/optc-save-gen.awk +++ b/gcc/optc-save-gen.awk @@ -1443,6 +1443,8 @@ checked_options["unroll_only_small_loops"]++ checked_options["TARGET_ALIGN_CALL"]++ checked_options["TARGET_CASE_VECTOR_PC_RELATIVE"]++ checked_options["arc_size_opt_level"]++ +# arm exceptions +checked_options["arm_fp16_format"]++ for (i = 0; i < n_opts; i++) { name = var_name(flags[i]); diff --git a/gcc/testsuite/gcc.target/arm/pr98636.c b/gcc/testsuite/gcc.target/arm/pr98636.c new file mode 100644 index 00000000000..c4d235cb43d --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr98636.c @@ -0,0 +1,6 @@ +/* { dg-do compile } */ +/* { dg-options "-mfp16-format=alternative" } */ + +#pragma GCC push_options +# pragma GCC target ("arch=armv8.2-a+fp16") /* { dg-error "selected fp16 options are incompatible" } */ +#pragma GCC pop_options