https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103418

--- Comment #8 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Thu, Nov 25, 2021 at 02:18:46PM -0800, Steve Kargl wrote:
> On Thu, Nov 25, 2021 at 10:10:32PM +0000, anlauf at gcc dot gnu.org wrote:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103418
> > 
> > --- Comment #6 from anlauf at gcc dot gnu.org ---
> > Unfortunately the patch in comment#5 does not work for me. :-(
> > 
> > Interestingly, the Intel compiler fails on the testcase, too.
> > 
> 
> Hmmm.  I did have a number of other patches in my tree.  I
> wonder if one of those helped.  Unfortunately, I updated
> my git repository, where I cleared out all patch, and it
> takes a long time to rebuild gcc on my laptop.
> 

For the record, 

module test
   implicit none
   contains
   subroutine change_pointer_target(ptr)
      real, pointer, intent(in) :: ptr(:)
      call random_number(ptr)
      ptr(:) = ptr + 1.0
   end subroutine change_pointer_target
end module test

program foo
   use test
   implicit none
   real, pointer :: a(:), b
   allocate(a(4), b)
   call random_number(b)
   call random_number(a)
   print '(5F8.5)', b, a
end program foo

% gfcx -o z a.f90 && ./z
 0.65287 0.82614 0.77541 0.61923 0.52961

Reply via email to