]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Escalate warning to error for VSX with explicit no-altivec etc.
authorKewen Lin <linkw@linux.ibm.com>
Tue, 23 Jul 2024 05:47:49 +0000 (00:47 -0500)
committerKewen Lin <linkw@gcc.gnu.org>
Tue, 23 Jul 2024 05:50:59 +0000 (00:50 -0500)
commit04da747a063850333b062e48d0531debe314dff9
tree3681698e67448725e7252e256b08e388be21509d
parent062e46a813799684c6f900815fd22451d6294ae1
rs6000: Escalate warning to error for VSX with explicit no-altivec etc.

As the discussion in PR115688, for now when users specify
-mvsx and -mno-altivec explicitly, compiler emits warning
rather than error, but considering both options are given
explicitly, emitting hard error should be better.

So this patch is to escalate some related warning to error
when both are incompatible.

PR target/115713

gcc/ChangeLog:

* config/rs6000/rs6000.cc (rs6000_option_override_internal): Emit error
messages when explicit VSX encounters explicit soft-float, no-altivec
or avoid-indexed-addresses.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/warn-1.c: Move to ...
* gcc.target/powerpc/error-1.c: ... here.  Adjust dg-warning with
dg-error and remove ineffective scan.
gcc/config/rs6000/rs6000.cc
gcc/testsuite/gcc.target/powerpc/error-1.c [moved from gcc/testsuite/gcc.target/powerpc/warn-1.c with 70% similarity]