From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 81EAF3952009; Fri, 12 Jun 2020 05:40:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81EAF3952009 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591940433; bh=OwepsUmf9WHSw7KgyBrhNgx86c4ggjFcGovHKF7B98I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yWnnolliJ9O2QNTlOgIow/zggLzoNiY/D670bxdCFUaq1wcsWjuwQNsSb6rnh6Z/W El3GFaD8TMwZ38jK2XQJ/M75JnAuMR6ffGS8Db1b9147QJUPJtSL/zrf4m8MzGOUfA UWeBJoD7a6DMmRqGwvLw2ypxXxQHuf9GUMf1IInE= From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/95640] gfortran ieee_selected_real_kind returns 10 Date: Fri, 12 Jun 2020 05:40:33 +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: 9.3.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned 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: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2020 05:40:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95640 --- Comment #13 from Steve Kargl = --- On Fri, Jun 12, 2020 at 04:16:53AM +0000, kargl at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95640 >=20 > --- Comment #12 from kargl at gcc dot gnu.org --- > (In reply to Bill Long from comment #11) > > I checked with the Intel docs and the ia64 version of the compiler (wha= t HPC > > users use) does not support x87.=20 > >=20 > > Is there a gfortran compiler option to disable x87 use (i.e. REAL(10) i= s an > > error), to match the other compilers? >=20 > The types are set up in trans-type.c(gfc_init_kinds). I > do not see an option that would disable querying for=20 > long_double_type_node. In principle, one might be able > to define an option that prevents gfortran from see a > long_double_type_node. This should then disable REAL(10). I have confirmed that having an -fdisable-real10 option could disable REAL(10) by commenting out the enumeration of long_double_type_node, i.e., Index: gcc/fortran/trans-types.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- gcc/fortran/trans-types.c (revision 280157) +++ gcc/fortran/trans-types.c (working copy) @@ -451,7 +451,7 @@ gfc_init_kinds (void) continue; if (mode !=3D TYPE_MODE (float_type_node) && (mode !=3D TYPE_MODE (double_type_node)) - && (mode !=3D TYPE_MODE (long_double_type_node)) +// && (mode !=3D TYPE_MODE (long_double_type_node)) #if defined(HAVE_TFmode) && defined(ENABLE_LIBQUADMATH_SUPPORT) && (mode !=3D TFmode) #endif With a bit of work, someone could do Index: gcc/fortran/trans-types.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- gcc/fortran/trans-types.c (revision 280157) +++ gcc/fortran/trans-types.c (working copy) @@ -451,7 +451,7 @@ gfc_init_kinds (void) continue; if (mode !=3D TYPE_MODE (float_type_node) && (mode !=3D TYPE_MODE (double_type_node)) - && (mode !=3D TYPE_MODE (long_double_type_node)) + && (!flag_disable_real10 || mode !=3D TYPE_MODE (long_double_type_node)) #if defined(HAVE_TFmode) && defined(ENABLE_LIBQUADMATH_SUPPORT) && (mode !=3D TFmode) #endif=