Cleanup the AArch64 testsuite when stack-clash is on.
authorTamar Christina <tamar.christina@arm.com>
Mon, 1 Oct 2018 13:05:30 +0000 (13:05 +0000)
committerTamar Christina <tnfchris@gcc.gnu.org>
Mon, 1 Oct 2018 13:05:30 +0000 (13:05 +0000)
commitc98f502f0ab9e51357665d7afcad724feee6088b
tree7e55159b79a8eb4575fbf7cc125f0282901f696e
parentfbe9af5042f7c09bc00c105ef1a30ac7149171e4
Cleanup the AArch64 testsuite when stack-clash is on.

This patch cleans up the testsuite when a run is done with stack clash
protection turned on.

Concretely this switches off -fstack-clash-protection for a couple of tests:

* assembler scan: some tests are quite fragile in that they check for exact
       assembly output, e.g. check for exact amount of sub etc.  These won't
       match now.
* vla: Some of the ubsan tests negative array indices. Because the arrays weren't
       used before the incorrect $sp wouldn't have been used. The correct value is
       restored on ret.  Now however we probe the $sp which causes a segfault.
* params: When testing the parameters we have to skip these on AArch64 because of our
          custom constraints on them.  We already test them separately so this isn't a
          loss.

Note that the testsuite is not entire clean due to gdb failure caused by alloca with
stack clash. On AArch64 we output an incorrect .loc directive, but this is already the
case with the current implementation in GCC and is a bug unrelated to this patch series.

gcc/testsuite/

PR target/86486
* gcc.dg/pr82788.c: Skip for AArch64.
* gcc.dg/guality/vla-1.c: Turn off stack-clash.
* gcc.target/aarch64/subsp.c: Likewise.
* gcc.dg/params/blocksort-part.c: Skip stack-clash checks
on AArch64.
* gcc.dg/stack-check-10.c: Add AArch64 specific checks.
* gcc.dg/stack-check-12.c: ILP32 fixup.
* gcc.dg/stack-check-5.c: Add AArch64 specific checks.
* gcc.dg/stack-check-6a.c: Skip on AArch64, we don't support this.
* testsuite/lib/target-supports.exp
(check_effective_target_frame_pointer_for_non_leaf): AArch64 does not
require frame pointer for non-leaf functions.

From-SVN: r264754
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/ubsan/vla-1.c
gcc/testsuite/gcc.dg/params/blocksort-part.c
gcc/testsuite/gcc.dg/pr82788.c
gcc/testsuite/gcc.dg/stack-check-10.c
gcc/testsuite/gcc.dg/stack-check-5.c
gcc/testsuite/gcc.dg/stack-check-6a.c
gcc/testsuite/gcc.target/aarch64/stack-check-12.c
gcc/testsuite/gcc.target/aarch64/subsp.c
gcc/testsuite/lib/target-supports.exp