This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52153] REAL128 gives extended precision, not quad precision
- From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 07 Feb 2012 22:39:48 +0000
- Subject: [Bug fortran/52153] REAL128 gives extended precision, not quad precision
- Auto-submitted: auto-generated
- References: <bug-52153-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52153
--- Comment #4 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2012-02-07 22:39:48 UTC ---
On Tue, Feb 07, 2012 at 09:52:39PM +0000, sgk at troutmask dot
apl.washington.edu wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52153
>
> --- Comment #3 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2012-02-07 21:52:39 UTC ---
> On Tue, Feb 07, 2012 at 09:26:01PM +0000, dominiq at lps dot ens.fr wrote:
> > > Yes, this is problem.
> >
> > So confirmed.
> >
>
> Yes, and I'm currently regression testing a patch (should
> be completed within the hour).
>
Regression tested without a problem, and it fixes the output
for the program in comment #2.
Index: trans-types.c
===================================================================
--- trans-types.c (revision 183972)
+++ trans-types.c (working copy)
@@ -257,12 +257,12 @@ gfc_get_real_kind_from_width_isofortrane
/* Look for a kind with matching storage size. */
for (i = 0; gfc_real_kinds[i].kind != 0; i++)
- if (int_size_in_bytes (gfc_get_real_type (gfc_real_kinds[i].kind)) ==
size)
+ if (gfc_real_kinds[i].kind == size)
return gfc_real_kinds[i].kind;
/* Look for a kind with larger storage size. */
for (i = 0; gfc_real_kinds[i].kind != 0; i++)
- if (int_size_in_bytes (gfc_get_real_type (gfc_real_kinds[i].kind)) > size)
+ if (gfc_real_kinds[i].kind > size)
return -2;
return -1;