--- Comment #6 from janus at gcc dot gnu dot org 2009-05-11 14:19 ---
Fixed with r147379. Closing.
--
janus at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #5 from janus at gcc dot gnu dot org 2009-05-11 14:14 ---
Subject: Bug 40089
Author: janus
Date: Mon May 11 14:14:38 2009
New Revision: 147379
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147379
Log:
2009-05-11 Janus Weil
PR fortran/40089
* reso
--- Comment #4 from burnus at gcc dot gnu dot org 2009-05-11 10:20 ---
> && !gfc_check_access (c->ts.derived->attr.access,
> c->ts.derived->ns->default_access))
> {
> - gfc_notify_std (GFC_STD_F2003, "Fortran 2003: the component '
--- Comment #3 from janus at gcc dot gnu dot org 2009-05-11 09:55 ---
Actually gfortran even has the same check as NAG that rejects a private type as
component of a public type with -std=f95. And it happens that the bug which
leads to the bogus error message lies just in this check. Thus
--- 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 PUB
--- Comment #1 from burnus at gcc dot gnu dot org 2009-05-11 08:07 ---
Without heavily thinking about it:
> print *,public_var_with_private_type%i
Seems to be valid in Fortran 2003 (but not in 2003). The components are not
PRIVATE and thus accessibly, even if the TYPE declaration is no