Commit 49a1164a by Thomas Koenig

re PR fortran/69742 (ICE with -O3 and ASSOCIATE containing repeated expression)

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
parent bf14eba2
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> 2016-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/60526 PR fortran/60526
......
...@@ -734,9 +734,9 @@ cfe_expr_0 (gfc_expr **e, int *walk_subtrees, ...@@ -734,9 +734,9 @@ cfe_expr_0 (gfc_expr **e, int *walk_subtrees,
gfc_expr *newvar; gfc_expr *newvar;
gfc_expr **ei, **ej; 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; *walk_subtrees = 0;
return 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> 2016-02-16 Jakub Jelinek <jakub@redhat.com>
PR c/69835 PR c/69835
......
! { 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
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