trans-types.c (gfc_init_kinds): Only pass float...
authorSteve Ellcey <sje@cup.hp.com>
Mon, 3 Oct 2005 15:29:30 +0000 (15:29 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Mon, 3 Oct 2005 15:29:30 +0000 (15:29 +0000)
* fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
and long double floating point types through to Fortran compiler.

From-SVN: r104892

gcc/fortran/ChangeLog
gcc/fortran/trans-types.c

index 0a8c4438a9b1ac30dd21b4eae9325a15e97c1953..0ee880d6a2f239c476bcdf18805795d499552f20 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-03  Steve Ellcey  <sje@cup.hp.com>
+
+       * fortran/trans-types.c (gfc_init_kinds): Only pass float, double,
+       and long double floating point types through to Fortran compiler.
+
 2005-10-03  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
 
        PR fortran/20120
index 6482df811612190a2c663a8b946562c9b9db641d..e16db8836a99cc8de2b1d28e6ffa85d3e3924655 100644 (file)
@@ -152,6 +152,14 @@ gfc_init_kinds (void)
       if (!targetm.scalar_mode_supported_p (mode))
        continue;
 
+      /* Only let float/double/long double go through because the fortran
+        library assumes these are the only floating point types.  */
+
+      if (mode != TYPE_MODE (float_type_node)
+         && (mode != TYPE_MODE (double_type_node))
+          && (mode != TYPE_MODE (long_double_type_node)))
+       continue;
+
       /* Let the kind equal the precision divided by 8, rounding up.  Again,
         this insulates the programmer from the underlying byte size.