This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/37513] Misleading error for (invalid) protected_pointer => unprotected_pointer
- From: "mikael dot morin at tele2 dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2008 11:20:13 -0000
- Subject: [Bug fortran/37513] Misleading error for (invalid) protected_pointer => unprotected_pointer
- References: <bug-37513-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from mikael dot morin at tele2 dot fr 2008-09-15 11:20 -------
(In reply to comment #0)
> I get one for "use good2", which is not only the lexpr->where/rexpr->where, but
> also the case if "use good2" is the only statement in "program main". I fail to
> understand why this goes wrong.
>
When trying to resolve t in main there is a call to gfc_check_assign_symbol (to
check that the initialization value is compatible) in resolve_values.
Knowing that, both the error reported and the place where it is reported make
sense as t is protected and t is imported from good2.
I hope this helps.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37513