On Sun, Dec 14, 2025 at 09:54:19PM -0800, Jerry D wrote:
> On 12/14/25 9:34 PM, Jerry D wrote:
> > 
> > I was looking through the testsuite in gfortran.dg and found the
> > following in bessel_6.f90.
> > 
> > ! { dg-add-options ieee }
> > 
> > This is at the top with no other directives. The documentation I find in
> > online docs does not mention this option ieee. It does say
> > "dg-add-options" must be preceded by a dg-do run.  There is no dg-do
> > anything anywhere.
> > 
> > So what exactly is this supposed to do?
> > 
> 
> I did find this blurb for dg-do:
> 
> The default is compile. That can be overridden for a set of tests by
> redefining dg-do-what-default within the .exp file for those tests.
> 
> So I suppose it is a compile test without a directive and the dg-add-options
> ieee has an effect only on targets that support it.
> 

The test was added 15 years ago.  As-is, I see

%  gmake check-fortran RUNTESTFLAGS='dg.exp=bessel_6.f90'
...

                === gfortran Summary ===

# of expected passes            1

If I add '! { dg-do compile } as the 1st line, I again get 1 pass.
So at most, this is a compile check that the compiler constant folds
correctly.  A comment in the code says its a run-time test.  Adding
'{ ! dg-do run } gives

%  gmake check-fortran RUNTESTFLAGS='dg.exp=bessel_6.f90'
...

                === gfortran Summary ===

# of expected passes            12

I suspect you found a possible bug.

-- 
Steve

Reply via email to