[Bug fortran/40089] Public type with public component which has a private type

janus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon May 11 08:23:00 GMT 2009



------- Comment #2 from janus at gcc dot gnu dot org  2009-05-11 08:23 -------

> Thus I would reason that g95, ifort and NAG (assuming Juergen Reuter is using
> it) are correct in accepting it.

NAG indeed accepts it with -f2003. With -f95 it reports

Extension: c0.f90, line 32: Dummy ARG of PUBLIC_SUB exposes PRIVATE type
PRIVATE_T detected at M@<end-of-statement>
Extension: c0.f90, line 32: Variable PUBLIC_VAR_WITH_PRIVATE_TYPE exposes
PRIVATE type PRIVATE_T detected at M@<end-of-statement>
Extension: c0.f90, line 32: Component PUBLIC_COMP_WITH_PRIVATE_TYPE of type
PUBLIC_T exposes PRIVATE type PRIVATE_T detected at M@<end-of-statement>

Probably it is really valid in F2003, and my common sense just failed. I will
try to fix gfortran's bogus error.


-- 


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



More information about the Gcc-bugs mailing list