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;

Reply via email to