2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/69742
* frontend-passes.c (cfe-expr_0): Don't register functions
from within an ASSOCIATE statement.
2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/69742
* gfortran.dg/associate_21.f90: New test.
From-SVN: r233474
+2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/69742
+ * frontend-passes.c (cfe-expr_0): Don't register functions
+ from within an ASSOCIATE statement.
+
2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/60526
gfc_expr *newvar;
gfc_expr **ei, **ej;
- /* Don't do this optimization within OMP workshare. */
+ /* Don't do this optimization within OMP workshare or ASSOC lists. */
- if (in_omp_workshare)
+ if (in_omp_workshare || in_assoc_list)
{
*walk_subtrees = 0;
return 0;
+2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/69742
+ * gfortran.dg/associate_21.f90: New test.
+
2016-02-16 Jakub Jelinek <jakub@redhat.com>
PR c/69835
--- /dev/null
+! { dg-do compile }
+! { dg-options "-ffrontend-optimize" }
+! PR 69742 - this used to ICE with front-end optimizatoin
+! Original test case by Marco Restelli.
+program p
+ implicit none
+ integer, allocatable :: i(:), j
+
+ allocate( i(5) )
+ i = (/( j , j=1,5 )/)
+
+ ! The ICE appears when "size(i)" is used twice in associate
+ associate( i5 => i(size(i):size(i)) ) ! this gives ICE
+ !associate( i5 => i(size(2*i):size(i)) ) ! this works
+ i5 = 2
+ end associate
+
+ write(*,*) i
+end program p