This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64][Testsuite] Fix gcc.target/aarch64/c-output-template-3.c
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Alan Lawrence <Alan dot Lawrence at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, Richard Biener <richard dot guenther at gmail dot com>
- Date: Tue, 7 Apr 2015 17:59:44 +0100
- Subject: Re: [PATCH][AArch64][Testsuite] Fix gcc.target/aarch64/c-output-template-3.c
- Authentication-results: sourceware.org; auth=none
- References: <5511862D dot 3010406 at arm dot com> <5511A311 dot 2090702 at arm dot com> <20150325182749 dot GA28408 at arm dot com>
On Wed, Mar 25, 2015 at 06:27:49PM +0000, James Greenhalgh wrote:
> I think your original patch to add -O is just fine, but Marcus or
> Richard will need to approve it.
I haven't seen any howls of objection from Marcus/Richard on this.
As you say, your preferred fix for the "S" constraint is far too intrusive
for GCC 5, but it seems sensible to investigate it for GCC 6. This implies
that we do actually have some undesirable behaviour (albeit behaviour
which we won't fix this year). So, we need a bugzilla ticket for the
"S" constraint failing - and with it a testcase, which will probably
look a lot like the one you are patching here!
As for this testcase... The purpose is to check that the "%c" output
modifier works properly with a complex label (see pr48637 for where this
went wrong for the arm target), not to check the "S" constraint. As such,
adding -O to cause the operand to be a symbol+offset again is a perfectly
fine approach.
In other words...
> gcc/testsuite/ChangeLog:
>
> gcc.target/aarch64/c-output-template.c: Add -O, remove
> -Wno-pointer-arith.
>
>diff --git a/gcc/testsuite/gcc.target/aarch64/c-output-template-3.c b/gcc/testsu
>index c28837c..8bde4cb 100644
>--- a/gcc/testsuite/gcc.target/aarch64/c-output-template-3.c
>+++ b/gcc/testsuite/gcc.target/aarch64/c-output-template-3.c
>@@ -1,5 +1,5 @@
> /* { dg-do compile } */
>-/* { dg-options "-Wno-pointer-arith" } */
>+/* { dg-options "-O" } */
>
> void
> test (void)
>
This patch is OK.
Cheers,
James