re PR tree-optimization/26524 (ICE when compiling with -ffast-math and -O3 clatm5.f (lapack))

PR tree-optimization/26524
	* tree-scalar-evolution.c (interpret_rhs_modify_expr): Use
	fold_convert to create a constant of the appropriate type.

	* gfortran.dg/pr26524.f: New test case.

From-SVN: r111676
This commit is contained in:
Roger Sayle 2006-03-03 14:35:23 +00:00 committed by Roger Sayle
parent 3fa9c136c3
commit 9a75ede07c
4 changed files with 30 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2006-03-03 Roger Sayle <roger@eyesopen.com>
PR tree-optimization/26524
* tree-scalar-evolution.c (interpret_rhs_modify_expr): Use
fold_convert to create a constant of the appropriate type.
2006-03-03 Richard Sandiford <richard@codesourcery.com>
* doc/tm.texi: Refer to SYMBOL_REF_HAS_BLOCK_INFO_P instead of

View File

@ -1,3 +1,8 @@
2006-03-03 Roger Sayle <roger@eyesopen.com>
PR tree-optimization/26524
* gfortran.dg/pr26524.f: New test case.
2006-03-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g++.dg/template/repo5.C: Cleanup repo files.

View File

@ -0,0 +1,16 @@
C PR tree-optimization/26524
C { dg-do compile }
C { dg-options "-O2 -ffast-math" }
SUBROUTINE CLATM5( PRTYPE, M, N, A, LDA, B, LDB, C, LDC, D, LDD,
$ E, LDE, F, LDF, R, LDR, L, LDL, ALPHA, QBLCKA,
$ QBLCKB )
COMPLEX A( LDA, * ), B( LDB, * ), C( LDC, * ),
$ L( LDL, * ), R( LDR, * )
COMPLEX IMEPS, REEPS
DO 240 I = 1, M
IF( MOD( I, 2 ).NE.0 .AND. I.LT.M ) THEN
A( I, I-1 ) = -IMEPS*2
END IF
240 CONTINUE
END

View File

@ -1647,9 +1647,9 @@ interpret_rhs_modify_expr (struct loop *loop, tree at_stmt,
opnd10 = TREE_OPERAND (opnd1, 0);
chrec10 = analyze_scalar_evolution (loop, opnd10);
chrec10 = chrec_convert (type, chrec10, at_stmt);
res = chrec_fold_multiply (type, chrec10, SCALAR_FLOAT_TYPE_P (type)
? build_real (type, dconstm1)
: build_int_cst_type (type, -1));
/* TYPE may be integer, real or complex, so use fold_convert. */
res = chrec_fold_multiply (type, chrec10,
fold_convert (type, integer_minus_one_node));
break;
case MULT_EXPR: