This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR31620 - [4.3 regression] Zeroing one component of array of derived types zeros the whole structure.
- From: "Andrew Pinski" <pinskia at gmail dot com>
- To: "Paul Richard Thomas" <paul dot richard dot thomas at gmail dot com>
- Cc: "fortran at gcc dot gnu dot org List" <fortran at gcc dot gnu dot org>, "gcc-patches List" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 22 Apr 2007 15:05:22 -0700
- Subject: Re: [Patch, fortran] PR31620 - [4.3 regression] Zeroing one component of array of derived types zeros the whole structure.
- References: <339c37f20704221403u25292732wed7bbfa9fb099b18@mail.gmail.com>
On 4/22/07, Paul Richard Thomas <paul.richard.thomas@gmail.com> wrote:
:ADDPATCH fortran:
This rather bad regression is due to all the components of an array of
derived types being part of the array in an assignment of zero to one
component. The patch is self-explanatory and the testcase is the
reporter's.
Does this fix also the following testcase (where I think
expr1->ref->next is NULL):
program test_assign
type my_type
integer :: a
integer :: b
end type my_type
type(my_type), dimension(1) :: mine ! note that MINE is an array
mine%a=4
mine%b=1
mine%b=0
if (any (mine%a .ne. 4)) call abort ()
end program test_assign
Thanks,
Andrew Pinski