> -----Original Message-----
> From: Richard Earnshaw (lists) <richard.earns...@arm.com>
> Sent: Thursday, February 15, 2024 11:01 AM
> To: Tamar Christina <tamar.christ...@arm.com>; gcc-patches@gcc.gnu.org
> Cc: nd <n...@arm.com>; Marcus Shawcroft <marcus.shawcr...@arm.com>; Kyrylo
> Tkachov <kyrylo.tkac...@arm.com>; Richard Sandiford
> <richard.sandif...@arm.com>
> Subject: Re: [PATCH]AArch64: xfail modes_1.f90 [PR107071]
> 
> On 15/02/2024 10:57, Tamar Christina wrote:
> > Hi All,
> >
> > This test has never worked on AArch64 since the day it was committed.  It 
> > has
> > a number of issues that prevent it from working on AArch64:
> >
> > 1.  IEEE does not require that FP operations raise a SIGFPE for FP 
> > operations,
> >     only that an exception is raised somehow.
> >
> > 2. Most Arm designed cores don't raise SIGFPE and instead set a status 
> > register
> >    and some partner cores raise a SIGILL instead.
> >
> > 3. The way it checks for feenableexcept doesn't really work for AArch64.
> >
> > As such this test doesn't seem to really provide much value on AArch64 so we
> > should just xfail it.
> >
> > Regtested on aarch64-none-linux-gnu and no issues.
> >
> > Ok for master?
> 
> Wouldn't it be better to just skip the test.  XFAIL just adds clutter to 
> verbose output
> and suggests that someday the tools might be fixed for this case.
> 
> Better still would be a new dg-requires fp_exceptions_raise_sigfpe as a guard 
> for
> the test.

There seems to be check_effective_target_fenv_exceptions which seems to test for
if the target can raise FP exceptions.  I'll see if that works.

Thanks,
Tamar

> 
> R.
> 
> >
> > Thanks,
> > Tamar
> >
> > gcc/testsuite/ChangeLog:
> >
> >         PR fortran/107071
> >         * gfortran.dg/ieee/modes_1.f90: xfail aarch64.
> >
> > --- inline copy of patch --
> > diff --git a/gcc/testsuite/gfortran.dg/ieee/modes_1.f90
> b/gcc/testsuite/gfortran.dg/ieee/modes_1.f90
> > index
> 205c47f38007d06116289c19d6b23cf3bf83bd48..3667571969427ae7b2b9668
> 4ec1af8b3fdd4985f 100644
> > --- a/gcc/testsuite/gfortran.dg/ieee/modes_1.f90
> > +++ b/gcc/testsuite/gfortran.dg/ieee/modes_1.f90
> > @@ -1,4 +1,4 @@
> > -! { dg-do run }
> > +! { dg-do run { xfail { aarch64*-*-* } } }
> >  !
> >  ! Test IEEE_MODES_TYPE, IEEE_GET_MODES and IEEE_SET_MODES
> >
> >
> >
> >
> >
> > --

Reply via email to