Commit e1b7f42e by Richard Biener Committed by Richard Biener

re PR fortran/64137 (Fortran FE builds invalid GENERIC)

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
parent 9b489f31
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> 2014-11-29 Jakub Jelinek <jakub@redhat.com>
* trans-openmp.c (gfc_omp_finish_clause, * trans-openmp.c (gfc_omp_finish_clause,
......
...@@ -3729,9 +3729,9 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op) ...@@ -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. */ possible value is HUGE in both cases. */
if (op == GT_EXPR) if (op == GT_EXPR)
tmp = fold_build1_loc (input_location, NEGATE_EXPR, TREE_TYPE (tmp), tmp); 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, 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); gfc_add_modify (&se->pre, limit, tmp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment