gcc/
2021-01-22 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR target/98636
* optc-save-gen.awk: Add arm_fp16_format to checked_options.
gcc/testsuite/
2021-01-22 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR target/98636
* gcc.target/arm/pr98636.c: New test.
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]);
--- /dev/null
+/* { 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