Commit e1332188 by Francois-Xavier Coudert Committed by François-Xavier Coudert

re PR fortran/33596 (ICE with simplified ISNAN)

	PR fortran/33596

	* trans-intrinsic.c (gfc_conv_intrinsic_isnan): Strip NOP_EXPR
	from the result of build_call_expr.

	* gfortran.dg/isnan_2.f90: New test.

From-SVN: r129782
parent 7e79298c
2007-10-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/33596
* trans-intrinsic.c (gfc_conv_intrinsic_isnan): Strip NOP_EXPR
from the result of build_call_expr.
2007-10-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31217
......
......@@ -2757,6 +2757,7 @@ gfc_conv_intrinsic_isnan (gfc_se * se, gfc_expr * expr)
gfc_conv_intrinsic_function_args (se, expr, &arg, 1);
se->expr = build_call_expr (built_in_decls[BUILT_IN_ISNAN], 1, arg);
STRIP_TYPE_NOPS (se->expr);
se->expr = fold_convert (gfc_typenode_for_spec (&expr->ts), se->expr);
}
......
2007-10-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/33596
* gfortran.dg/isnan_2.f90: New test.
2007-10-30 Ed Schouten <ed@fxq.nl>
PR tree-optimization/32500
! Test for the ISNAN intrinsic on constants
!
! { dg-do run }
! { dg-options "-fno-range-check" }
! { dg-options "-fno-range-check -pedantic-errors -mieee" { target sh*-*-* } }
!
implicit none
character(len=1) :: s
write(s,'(L1)') isnan(0.)
if (s /= 'F') call abort
write(s,'(L1)') isnan(exp(huge(0.)))
if (s /= 'F') call abort
write(s,'(L1)') isnan(0./0.)
if (s /= 'T') call abort
end
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