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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164570
138bc75d-0d04-0410-961f-
82ee72b054a4
+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>
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.
--- /dev/null
+! { 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