Compare commits

...

2 Commits

Author SHA1 Message Date
Ayappan Perumal 3c19cdc808 Error out stack-protector unavailability on AIX
stack-protector is not supported in GCC on AIX. This patch is to fail the
compilation if -fstack-protector option is passed.

gcc/ChangeLog:

	* config/rs6000/aix.h (SUBTARGET_DRIVER_SELF_SPECS):
	Error out when stack-protector option is used in AIX
	as it is not supported on AIX

	Approved By: Segher Boessenkool <segher@kernel.crashing.org>

(cherry picked from commit dfb7e97dd2)
2025-10-16 04:50:28 -05:00
Alex Coplan 0751f3f802 aarch64, testsuite: Add -fchecking to test options [PR121772]
I noticed while testing a backport of the PR121772 fix to GCC 13 that
the test wasn't triggering the ICE as expected with the unpatched
compiler.

This turned out to be because the ICE is a checking ICE, and we
configure by default with --enable-checking=release on the branches.
Additionally, I hadn't noticed when doing the backports to 15 and 14
since there we still ICE later on in emit_move_insn even if we don't
catch the invalid gimple with checking.

I'm not too sure why the 13 branch doesn't see the emit_move_insn ICE,
but it's somewhat irrelevant - the important thing is that adding
-fchecking to the options makes the test fail as expected with an
unpatched compiler (i.e. with a gimple checking failure), even on
release branches.

I considered applying this patch to just the release branches, but
figured that trunk will at some point itself become a release branch, so
it seems to make most sense just to apply it everywhere.

I've checked that the test still passes with this patch, and still fails
if I revert the PR121772 fix.

gcc/testsuite/ChangeLog:

	PR tree-optimization/121772
	* gcc.target/aarch64/torture/pr121772.c: Add -fchecking to
	dg-options.

(cherry picked from commit 0c670d3845)
2025-10-16 10:26:54 +01:00
2 changed files with 4 additions and 1 deletions

View File

@ -281,4 +281,6 @@
#undef SUBTARGET_DRIVER_SELF_SPECS
#define SUBTARGET_DRIVER_SELF_SPECS \
"%{m64:-maix64} %<m64", \
"%{m32:-maix32} %<m32"
"%{m32:-maix32} %<m32", \
"%{fstack-protector*: %<fstack-protector* \
%estack-protector not supported on AIX}"

View File

@ -1,4 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-fchecking" } */
#include <arm_neon.h>
int16_t f(int16x4_t b) {
return vaddvq_s16(vcombine_s16(b, vdup_n_s16 (0)));