diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-11 16:42:29 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-11 16:42:29 +0000 |
commit | 1edb55c86493dbfd1f57a3e41536673fb66588d6 (patch) | |
tree | ce83cffc923534eee65e3ba122dfa1897efa8daa | |
parent | 367b55f3d8616168d95f009f4b121d7a91cdd833 (diff) | |
download | ppe42-gcc-1edb55c86493dbfd1f57a3e41536673fb66588d6.tar.gz ppe42-gcc-1edb55c86493dbfd1f57a3e41536673fb66588d6.zip |
PR fortran/49698
* trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
inner_size to gfc_index_one_node instead of integer_one_node.
* gfortran.dg/pr49698.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176164 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-stmt.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr49698.f90 | 15 |
4 files changed, 28 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2f0b50889f4..9484523370c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2011-07-11 Jakub Jelinek <jakub@redhat.com> + + PR fortran/49698 + * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize + inner_size to gfc_index_one_node instead of integer_one_node. + 2011-07-10 Tobias Burnus <burnus@net-b.de> PR fortran/49690 diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 88fdcd182d0..7117219851f 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -3323,7 +3323,7 @@ gfc_trans_pointer_assign_need_temp (gfc_expr * expr1, gfc_expr * expr2, count = gfc_create_var (gfc_array_index_type, "count"); gfc_add_modify (block, count, gfc_index_zero_node); - inner_size = integer_one_node; + inner_size = gfc_index_one_node; lss = gfc_walk_expr (expr1); rss = gfc_walk_expr (expr2); if (lss == gfc_ss_terminator) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index efb3482b573..36c375d7f20 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,9 @@ -2011-07-11 Jeff Law <law@redhat.com> +2011-07-11 Jakub Jelinek <jakub@redhat.com> + + PR fortran/49698 + * gfortran.dg/pr49698.f90: New test. + +2011-07-11 Jeff Law <law@redhat.com> * gcc.dg/uninit-pred-8_b.c: Disable dominator optimizations. diff --git a/gcc/testsuite/gfortran.dg/pr49698.f90 b/gcc/testsuite/gfortran.dg/pr49698.f90 new file mode 100644 index 00000000000..638cbb0b785 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr49698.f90 @@ -0,0 +1,15 @@ +! PR fortran/49698 +! { dg-do compile } +subroutine foo (x, y, z) + type S + integer, pointer :: e => null() + end type S + type T + type(S), dimension(:), allocatable :: a + end type T + type(T) :: x, y + integer :: z, i + forall (i = 1 : z) + y%a(i)%e => x%a(i)%e + end forall +end subroutine foo |