diff mbox series

Fix gcc.dg/gomp/pr89104.c failure on aarch64

Message ID 6e747c77678460af40bf06c60ec4e9118bac0946.camel@marvell.com
State New
Headers show
Series Fix gcc.dg/gomp/pr89104.c failure on aarch64 | expand

Commit Message

Steve Ellcey July 24, 2019, 8:51 p.m. UTC
I noticed that the test gcc.dg/gomp/pr89104.c fails on aarch64 platforms.
As mentioned in the bug report for PR 89104, this message is coming from
aarch64 target specific code which is why it does not occur on other
platforms.  There doesn't seem to be complete consensus in the bug report
on how to deal with this but I chose to just use -w on aarch64 to surpress
the warning.

The warning that we get is:

pr89104.c:8:1: warning: GCC does not currently support mixed size types for ‘simd’ functions
    8 | foo (int *x, int y)

This is because 'x' is a 64 bit pointer and 'y' is a 32 bit integer
in the default LP64 mode.  If I use -mabi=ilp32, then aarch64 does not 
generate a warning because both arguments are 32 bits.  I could force
ILP32 mode for aarch64 and/or only use -w only when not in 32 bit mode
but that seemed like overkill to me.

OK to checkin?

Steve Ellcey
sellcey@marvell.com



2019-07-24  Steve Ellcey  <sellcey@marvell.com>

	* gcc.dg/gomp/pr89104.c: Use -w on aarch64*-*-* targets.

Comments

Rainer Orth July 24, 2019, 9:05 p.m. UTC | #1
Hi Steve,

> 2019-07-24  Steve Ellcey  <sellcey@marvell.com>
>
> 	* gcc.dg/gomp/pr89104.c: Use -w on aarch64*-*-* targets.
>
>
> diff --git a/gcc/testsuite/gcc.dg/gomp/pr89104.c b/gcc/testsuite/gcc.dg/gomp/pr89104.c
> index 505fdda..7f0f688 100644
> --- a/gcc/testsuite/gcc.dg/gomp/pr89104.c
> +++ b/gcc/testsuite/gcc.dg/gomp/pr89104.c
> @@ -2,6 +2,7 @@
>  /* PR ipa/89104 */
>  /* { dg-do compile } */
>  /* { dg-options "-O2 -fopenmp-simd" } */
> +/* { dg-options "-O2 -fopenmp-simd -w" { target aarch64*-*-* } } */

please use 

/* { dg-additional-options "-w" { target aarch64*-*-* } } */

instead of repeating the option list.  I'll leave approval of the
substance of the patch to an OpenMP maintainer.

	Rainer
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/gomp/pr89104.c b/gcc/testsuite/gcc.dg/gomp/pr89104.c
index 505fdda..7f0f688 100644
--- a/gcc/testsuite/gcc.dg/gomp/pr89104.c
+++ b/gcc/testsuite/gcc.dg/gomp/pr89104.c
@@ -2,6 +2,7 @@ 
 /* PR ipa/89104 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -fopenmp-simd" } */
+/* { dg-options "-O2 -fopenmp-simd -w" { target aarch64*-*-* } } */
 
 #pragma omp declare simd uniform (x) aligned (x)
 int