Commit 962b8a0e by Thomas Koenig

re PR fortran/45744 (ICE with -O1 in gfc_conv_expr_op, at fortran/trans-expr.c:1366)

2010-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/45744
	* frontend-passes.c (optimize_binop_array_assignment):
	Only re-use lhs as intermediate storage if kind and type
	parameters match.

2010-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/45744
	* gfortran.dg/dependency_36.f90:  New test.

From-SVN: r164570
parent 5109c83f
2010-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45744
* frontend-passes.c (optimize_binop_array_assignment):
Only re-use lhs as intermediate storage if kind and type
parameters match.
2010-09-23 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/45745
PR fortran/45648
* trans-array.c (gfc_conv_expr_descriptor): Handle
ss->type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case.
* trans-array.c (gfc_conv_expr_descriptor): Handle
ss->type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case.
2010-09-23 Tobias Burnus <burnus@net-b.de>
......
......@@ -122,8 +122,13 @@ optimize_binop_array_assignment (gfc_code *c, gfc_expr **rhs, bool seen_op)
else if (seen_op && e->expr_type == EXPR_FUNCTION && e->rank > 0
&& ! (e->value.function.esym
&& (e->value.function.esym->attr.elemental
|| e->value.function.esym->attr.allocatable))
&& ! (e->value.function.isym && e->value.function.isym->elemental))
|| e->value.function.esym->attr.allocatable
|| e->value.function.esym->ts.type != c->expr1->ts.type
|| e->value.function.esym->ts.kind != c->expr1->ts.kind))
&& ! (e->value.function.isym
&& (e->value.function.isym->elemental
|| e->ts.type != c->expr1->ts.type
|| e->ts.kind != c->expr1->ts.kind)))
{
gfc_code *n;
......
2010-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45744
* gfortran.dg/dependency_36.f90: New test.
2010-09-23 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/pad-1.c: Remove -S from dg-options.
......
! { dg-do compile }
! { dg-options "-O -Warray-temporaries" }
! PR 45744 - this used to ICE because of type mismatch
! in the generated temporary.
MODULE m
CONTAINS
FUNCTION rnd(n)
INTEGER, INTENT(in) :: n
REAL(8), DIMENSION(n) :: rnd
CALL RANDOM_NUMBER(rnd)
END FUNCTION rnd
SUBROUTINE GeneticOptimize(n)
INTEGER :: n
LOGICAL :: mask(n)
REAL(8) :: popcross=0
REAL(4) :: foo(n)
real(4) :: a(n,n), b(n,n)
real(8) :: c(n,n)
integer(4) :: x(n,n)
integer(8) :: bar(n)
mask = (rnd(n) < popcross) ! { dg-warning "Creating array temporary" }
foo = rnd(n) ! { dg-warning "Creating array temporary" }
bar = rnd(n) ! { dg-warning "Creating array temporary" }
c = matmul(a,b) ! { dg-warning "Creating array temporary" }
x = matmul(a,b) ! { dg-warning "Creating array temporary" }
END SUBROUTINE GeneticOptimize
END MODULE m
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