]> gcc.gnu.org Git - gcc.git/commitdiff
re PR fortran/64137 (Fortran FE builds invalid GENERIC)
authorRichard Biener <rguenther@suse.de>
Tue, 2 Dec 2014 08:50:57 +0000 (08:50 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 2 Dec 2014 08:50:57 +0000 (08:50 +0000)
2014-12-02  Richard Biener  <rguenther@suse.de>

PR fortran/64137
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Check
proper expressions type, use proper type for computing
-Huge - 1.

From-SVN: r218259

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

index db8b5cdf5b770c497a25df1edb6545b22d70694d..4bf21edef6091d2350d64e3a60e21876f616044b 100644 (file)
@@ -1,3 +1,10 @@
+2014-12-02  Richard Biener  <rguenther@suse.de>
+
+       PR fortran/64137
+       * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Check
+       proper expressions type, use proper type for computing
+       -Huge - 1.
+
 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
 
        * trans-openmp.c (gfc_omp_finish_clause,
index c13502e5a4e42871568e605e738932f430e76294..d5972077940043be2819c5e0c7536e88715f0b2b 100644 (file)
@@ -3729,9 +3729,9 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op)
      possible value is HUGE in both cases.  */
   if (op == GT_EXPR)
     tmp = fold_build1_loc (input_location, NEGATE_EXPR, TREE_TYPE (tmp), tmp);
-  if (op == GT_EXPR && expr->ts.type == BT_INTEGER)
+  if (op == GT_EXPR && arrayexpr->ts.type == BT_INTEGER)
     tmp = fold_build2_loc (input_location, MINUS_EXPR, TREE_TYPE (tmp), tmp,
-                          build_int_cst (type, 1));
+                          build_int_cst (TREE_TYPE (tmp), 1));
 
   gfc_add_modify (&se->pre, limit, tmp);
 
This page took 0.073262 seconds and 5 git commands to generate.