[Bug fortran/71967] Protected and private specified at the same time and the symbol is accessible
vladimir.fuka at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Jul 22 12:16:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71967
--- Comment #5 from Vladimir Fuka <vladimir.fuka at gmail dot com> ---
OMG, I forgot implicit none and the only clause. Sorry. So is ifort wrong
in treating protected like an access statement?
Dne 22. 7. 2016 13:04 napsal uživatel "dominiq at lps dot ens.fr" <
gcc-bugzilla@gcc.gnu.org>:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71967
>
> --- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> > But in that case, why is the private access-stmt ignored?
>
> It is not: consider
>
> module m
> protected :: k
> private :: k
>
> integer :: k = 42
> end module
>
> use m
> integer :: k = 3
> print *, k
> end
>
> 'k' is set to 42 in module m, but is not visible in the main program where
> it
> is set to 3.
>
> --
> You are receiving this mail because:
> You reported the bug.
More information about the Gcc-bugs
mailing list