re PR fortran/34028 (Type mismatch with optimization of ISHFT)

PR fortran/34028
	* trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use correct type.

From-SVN: r130003
This commit is contained in:
Francois-Xavier Coudert 2007-11-08 15:33:23 +00:00 committed by François-Xavier Coudert
parent abf86978b3
commit 8dc9f613ea
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-11-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/34028
* trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use correct type.
2007-11-08 Tobias Burnus <burnus@net-b.de>
PR fortran/33917

View File

@ -2533,7 +2533,7 @@ gfc_conv_intrinsic_ishft (gfc_se * se, gfc_expr * expr)
/* The Fortran standard allows shift widths <= BIT_SIZE(I), whereas
gcc requires a shift width < BIT_SIZE(I), so we have to catch this
special case. */
num_bits = build_int_cst (TREE_TYPE (args[0]), TYPE_PRECISION (type));
num_bits = build_int_cst (TREE_TYPE (args[1]), TYPE_PRECISION (type));
cond = fold_build2 (GE_EXPR, boolean_type_node, width, num_bits);
se->expr = fold_build3 (COND_EXPR, type, cond,