[fortran, patch] Add Fortran 2003 IEEE intrinsic modules

Dominique Dhumieres dominiq@lps.ens.fr
Fri Nov 22 22:19:00 GMT 2013


> > As a general comment, I think the tests should go in a gfortran.dg/ieee directory
> > and the options "-fno-unsafe-math-optimizations -frounding-math -fsignaling-nans"
> > should be handled by an ieee.exp driver, rather than highjacking target-supports.exp.
>
> I followed the existing logic (other intrinsic modules don't have their own directory)
> but I'm willing to move it to a special directory, with a specific driver.

I have tested the following driver (borrowed from gfortran.dg/gomp/gomp.exp)

# Copyright (C) 2005-2013 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
# GCC is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# GCC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3.  If not see
# <http://www.gnu.org/licenses/>.

# GCC testsuite that uses the `dg.exp' driver.

# Load support procs.
load_lib gfortran-dg.exp
load_lib target-supports.exp

# Initialize `dg'.
dg-init

if ![check_effective_target_fortran_ieee] {
  return
}

if [info exists TOOL_OPTIONS] {
    set specpath [get_multilibs ${TOOL_OPTIONS}]
} else {
    set specpath [get_multilibs]
}
set extra "-fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -fintrinsic-modules-path $specpath/libgfortran/"

# Main loop.
gfortran-dg-runtest [lsort \
       [find $srcdir/$subdir *.\[fF\]{,90,95,03,08} ] ] $extra

# All done.
dg-finish

as gfortran.dg/ieee/ieee.exp, with all the ieee tests moved to gfortran.dg/ieee/
and add_options_for_ieee reverted to its original state. This fixed the extra
gfortran failures and do the testing of the ieee new tests.

Dominique



More information about the Fortran mailing list