https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117430
--- Comment #4 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
If I had just scrolled down in resolve.cc a few more hunks, eye roll:
$ gfc -pedantic zorig.f90
zorig.f90:45:32:
45 | write(*,*) "B:", self%cptr
| 1
Warning: GNU Extension: Data transfer element at (1) cannot have PRIVATE
components
zorig.f90:34:61:
34 | if (.not. self%cptr_invalid) write(*,*) "A:", self%cptr
| 1
Warning: GNU Extension: Data transfer element at (1) cannot have PRIVATE
components
and
$ gfc -std=f2008 zorig.f90
zorig.f90:45:32:
45 | write(*,*) "B:", self%cptr
| 1
Error: GNU Extension: Data transfer element at (1) cannot have PRIVATE
components
zorig.f90:34:61:
34 | if (.not. self%cptr_invalid) write(*,*) "A:", self%cptr
| 1
Error: GNU Extension: Data transfer element at (1) cannot have PRIVATE
components
zorig.f90:58:8:
58 | use FinalizerTestModule
| 1
Fatal Error: Cannot open module file ‘finalizertestmodule.mod’ for reading at
(1): No such file or directory
compilation terminated.
Now the question is, do we tweak the existing handling of this or leave it
alone. I think this is an example where allowing non standard stuff can bite
us. I did spend some time here that could have been avoided if we did the right
thing.