https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101123
--- Comment #4 from anlauf at gcc dot gnu.org ---
Untested potential fix:
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index 73b0bcc9dea..e578449995a 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -4147,10 +4147,7 @@ gfc_conv_intrinsic_minmax (gfc_se * se, gfc_expr * expr,
enum tree_code op)
build_empty_stmt (input_location));
gfc_add_expr_to_block (&se->pre, tmp);
}
- if (TREE_CODE (type) == INTEGER_TYPE)
- se->expr = fold_build1_loc (input_location, FIX_TRUNC_EXPR, type, mvar);
- else
- se->expr = convert (type, mvar);
+ se->expr = convert (type, mvar);
}
Not sure if there is some cornercase which will get mishandled.