public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-6850] arm: Fix ICE with incompatible values for -mfp16-format [PR98636].
@ 2021-01-22  8:45 Prathamesh Kulkarni
  0 siblings, 0 replies; only message in thread
From: Prathamesh Kulkarni @ 2021-01-22  8:45 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4e3beaca15cab2de88a68d76f0aabc68e68f678a

commit r11-6850-g4e3beaca15cab2de88a68d76f0aabc68e68f678a
Author: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Date:   Fri Jan 22 14:14:20 2021 +0530

    arm: Fix ICE with incompatible values for -mfp16-format [PR98636].
    
    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.

Diff:
---
 gcc/optc-save-gen.awk                  | 2 ++
 gcc/testsuite/gcc.target/arm/pr98636.c | 6 ++++++
 2 files changed, 8 insertions(+)

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-22  8:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22  8:45 [gcc r11-6850] arm: Fix ICE with incompatible values for -mfp16-format [PR98636] Prathamesh Kulkarni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).