From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15452 invoked by alias); 28 Jun 2014 14:18:25 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15379 invoked by uid 55); 28 Jun 2014 14:18:20 -0000 From: "fxcoudert at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/29383] Fortran 2003/F95[TR15580:1999]: Floating point exception (IEEE) support Date: Sat, 28 Jun 2014 14:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.2.0 X-Bugzilla-Keywords: patch X-Bugzilla-Severity: enhancement X-Bugzilla-Who: fxcoudert at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: fxcoudert at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg02290.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29383 --- Comment #15 from Francois-Xavier Coudert --- Author: fxcoudert Date: Sat Jun 28 14:17:41 2014 New Revision: 212102 URL: https://gcc.gnu.org/viewcvs?rev=212102&root=gcc&view=rev Log: PR fortran/29383 gcc/fortran/ * gfortran.h (gfc_simplify_ieee_selected_real_kind): New prototype. * libgfortran.h (GFC_FPE_*): Use simple integer values, valid in both C and Fortran. * expr.c (gfc_check_init_expr): Simplify IEEE_SELECTED_REAL_KIND. * simplify.c (gfc_simplify_ieee_selected_real_kind): New function. * module.c (mio_symbol): Keep track of symbols which came from intrinsic modules. (gfc_use_module): Keep track of the IEEE modules. * trans-decl.c (gfc_get_symbol_decl): Adjust code since we have new intrinsic modules. (gfc_build_builtin_function_decls): Build decls for ieee_procedure_entry and ieee_procedure_exit. (is_from_ieee_module, is_ieee_module_used, save_fp_state, restore_fp_state): New functions. (gfc_generate_function_code): Save and restore floating-point state on procedure entry/exit, when IEEE modules are used. * intrinsic.texi: Document the IEEE modules. libgfortran/ * configure.host: Add checks for IEEE support, rework priorities. * configure.ac: Define IEEE_SUPPORT, check for fpsetsticky and fpresetsticky. * configure: Regenerate. * Makefile.am: Build new ieee files, install IEEE_* modules. * Makefile.in: Regenerate. * gfortran.map (GFORTRAN_1.6): Add new symbols. * libgfortran.h (get_fpu_trap_exceptions, set_fpu_trap_exceptions, support_fpu_trap, set_fpu_except_flags, support_fpu_flag, support_fpu_rounding_mode, get_fpu_state, set_fpu_state): New prototypes. * config/fpu-*.h (get_fpu_trap_exceptions, set_fpu_trap_exceptions, support_fpu_trap, set_fpu_except_flags, support_fpu_flag, support_fpu_rounding_mode, get_fpu_state, set_fpu_state): New functions. * ieee/ieee_features.F90: New file. * ieee/ieee_exceptions.F90: New file. * ieee/ieee_arithmetic.F90: New file. * ieee/ieee_helper.c: New file. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_fortran_ieee): New function. * gfortran.dg/ieee/ieee.exp: New file. * gfortran.dg/ieee/ieee_1.F90: New file. * gfortran.dg/ieee/ieee_2.f90: New file. * gfortran.dg/ieee/ieee_3.f90: New file. * gfortran.dg/ieee/ieee_4.f90: New file. * gfortran.dg/ieee/ieee_5.f90: New file. * gfortran.dg/ieee/ieee_6.f90: New file. * gfortran.dg/ieee/ieee_7.f90: New file. * gfortran.dg/ieee/ieee_rounding_1.f90: New file. Added: trunk/gcc/testsuite/gfortran.dg/ieee/ trunk/gcc/testsuite/gfortran.dg/ieee/ieee.exp trunk/gcc/testsuite/gfortran.dg/ieee/ieee_1.F90 trunk/gcc/testsuite/gfortran.dg/ieee/ieee_2.f90 trunk/gcc/testsuite/gfortran.dg/ieee/ieee_3.f90 trunk/gcc/testsuite/gfortran.dg/ieee/ieee_4.f90 trunk/gcc/testsuite/gfortran.dg/ieee/ieee_5.f90 trunk/gcc/testsuite/gfortran.dg/ieee/ieee_6.f90 trunk/gcc/testsuite/gfortran.dg/ieee/ieee_7.f90 trunk/gcc/testsuite/gfortran.dg/ieee/ieee_rounding_1.f90 trunk/libgfortran/ieee/ trunk/libgfortran/ieee/ieee_arithmetic.F90 trunk/libgfortran/ieee/ieee_exceptions.F90 trunk/libgfortran/ieee/ieee_features.F90 trunk/libgfortran/ieee/ieee_helper.c Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/expr.c trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/intrinsic.texi trunk/gcc/fortran/libgfortran.h trunk/gcc/fortran/module.c trunk/gcc/fortran/simplify.c trunk/gcc/fortran/trans-decl.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/lib/target-supports.exp trunk/libgfortran/ChangeLog trunk/libgfortran/Makefile.am trunk/libgfortran/Makefile.in trunk/libgfortran/config/fpu-387.h trunk/libgfortran/config/fpu-aix.h trunk/libgfortran/config/fpu-generic.h trunk/libgfortran/config/fpu-glibc.h trunk/libgfortran/config/fpu-sysv.h trunk/libgfortran/configure trunk/libgfortran/configure.ac trunk/libgfortran/configure.host trunk/libgfortran/gfortran.map trunk/libgfortran/libgfortran.h