+2011-03-29 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * frontend-passes.c (create_var): Warn about creating an
+ array temporary if requested.
+
2011-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/47065
- * frontend-passes (optimize_trim): Also follow references, except
+ * frontend-passes.c (optimize_trim): Also follow references, except
when they are substring references or array references.
2011-03-27 Tobias Burnus <burnus@net-b.de>
result->ref->u.ar.type = AR_FULL;
result->ref->u.ar.where = e->where;
result->ref->u.ar.as = symbol->as;
+ if (gfc_option.warn_array_temp)
+ gfc_warning ("Creating array temporary at %L", &(e->where));
}
/* Generate the new assignment. */
+2011-03-29 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * gfortran.dg/function_optimize_1.f90: Add -Warray-temporaries,
+ check for corresponding warning.
+
2011-03-28 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/rv-deduce2.C: New.
! { dg-do compile }
-! { dg-options "-O -fdump-tree-original" }
+! { dg-options "-O -fdump-tree-original -Warray-temporaries" }
program main
implicit none
real, dimension(2,2) :: a, b, c, d
data a /2., 3., 5., 7./
data b /11., 13., 17., 23./
- write (unit=line, fmt='(4F7.2)') matmul(a,b) + matmul(a,b)
+ write (unit=line, fmt='(4F7.2)') matmul(a,b) &
+ & + matmul(a,b) ! { dg-warning "Creating array temporary" }
z = sin(x) + cos(x) + sin(x) + cos(x)
print *,z
x = ext_func(a) + 23 + ext_func(a)