> On 15 Dec 2025, at 05:34, Jerry D <[email protected]> wrote:
> 
> Hi all,
> 
> 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?


dg-add-options XXXXX

gets translated into 
add_options_for_XXXXX

which is supposed to add any target-specific options needed to support XXXXX

in this case;

# Add to FLAGS all the target-specific flags needed to enable
# full IEEE compliance mode.

proc add_options_for_ieee { flags } {
    if { [istarget alpha*-*-*]
         || [istarget sh*-*-*] } {
       return "$flags -mieee"
    }
    if { [istarget rx-*-*] } {
       return "$flags -mnofpu"
    }
    return $flags
}

so it’s somewhat orthogonal to whether the test is a compile or run test (the 
constraint mentioned does apply tho - some things in the dg-* processing are 
order-specific).

HTH
Iain

> 
> Jerry
> 
> 
> 

Reply via email to