diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5c6d82cbad2..aaff4b425aa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-03-28 Jan Hubicka + + PR tree-optimization/43505 + * cgraph.c (cgraph_clone_node): When clonning a clone, replacement + map should not be copied. + 2010-03-27 John David Anglin PR middle-end/41674 diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 0e02bae1402..8fe72b44c53 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1891,6 +1891,7 @@ cgraph_clone_node (struct cgraph_node *n, gcov_type count, int freq, new_node->rtl = n->rtl; new_node->count = count; new_node->clone = n->clone; + new_node->clone.tree_map = 0; if (n->count) { if (new_node->count > n->count) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 51cfa8b82b8..df9d597793c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-03-28 Jan Hubicka + + PR tree-optimization/43505 + * gfortran.dg/pr43505.f90: New testcase. + 2010-03-27 Uros Bizjak PR tree-optimization/43528 diff --git a/gcc/testsuite/gfortran.dg/pr43505.f90 b/gcc/testsuite/gfortran.dg/pr43505.f90 new file mode 100644 index 00000000000..bdeb6c538c2 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr43505.f90 @@ -0,0 +1,43 @@ + MODULE MAIN1 + INTEGER , PARAMETER :: MXGLVL = 87 + CHARACTER(8) :: SRCTYP + REAL :: GRIDWS(MXGLVL) + REAL :: ZI, HS + END MODULE MAIN1 + + PROGRAM TEST + USE MAIN1 + IF (HS >= ZI) THEN + ELSEIF ( SRCTYP == 'AREA' & + .OR. SRCTYP == 'AREAPOLY' & + .OR. SRCTYP == 'AREACIRC' & + .OR. SRCTYP == 'OPENPIT' ) THEN + CALL ANYAVG (MXGLVL, GRIDWS) + CALL ANYAVG (MXGLVL, GRIDWS) + ELSE + IF ( HS > 0.0 ) THEN + CALL ANYAVG (MXGLVL, GRIDWS) + CALL ANYAVG (MXGLVL, GRIDWS) + CALL ANYAVG (MXGLVL, GRIDWS) + ENDIF + ENDIF + IF (HS.LT.ZI) THEN + ZI = HS + ENDIF + contains + SUBROUTINE ANYAVG(NLVLS,HTS) + INTEGER NLVLS + REAL HTS(NLVLS) + IF (5.LT.NLVLS) THEN + CALL GINTRP (HTS(5),HTS(5+1)) + ENDIF + CALL GINTRP (HTS(5-1), HTS(5)) + END SUBROUTINE ANYAVG + + subroutine gintrp (x1, x2) + print *, x1, x2 + end subroutine + + END PROGRAM TEST + +