------- Comment #2 from dfranke at gcc dot gnu dot org  2007-04-18 14:25 -------
$> cat pr31620.f90
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%b=4
  mine%a=1
  print *,  mine
  mine%a=0
  print *,  mine
end program test_assign

$> gfortran-svn -g -fdump-tree-original pr31620.f90

The dump shows between the print statements:
[...]
(void) __builtin_memset ((void *) &mine, 0, 8);
[...]
which obviously is the culprit.

Adding Roger Sayle as CC as he worked on this a while ago.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at eyesopen dot com
           Keywords|                            |wrong-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31620

Reply via email to