[Bug fortran/123782] False error in pointer to contiguous component selection
kargl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 24 00:29:28 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123782
--- Comment #6 from Steve Kargl <kargl at gcc dot gnu.org> ---
Interestly, flang21 compiles the following
program foo
implicit none
type t1
real :: x
integer :: i
end type
type(t1), target :: a(5) ! supposed to be contiguous
real, pointer, contiguous :: c(:)
a = [t1(1.,42), t1(2.,43), t1(3.,44), t1(4.,45), t1(5.,46)]
c => a%x ! False error?
print *, c
end program foo
% flang21 -o z uo.f90 && ./z
1. 2. 3. 4. 5.
More information about the Gcc-bugs
mailing list