This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: *PING* Re: [Patch, Fortran] PR58658 - add missing pointer-assign check for CLASS(*)
- From: Tobias Burnus <burnus at net-b dot de>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: gcc patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Tue, 15 Oct 2013 22:20:47 +0200
- Subject: Re: *PING* Re: [Patch, Fortran] PR58658 - add missing pointer-assign check for CLASS(*)
- Authentication-results: sourceware.org; auth=none
- References: <5253283C dot 2030808 at net-b dot de> <525A50F1 dot 9040005 at net-b dot de> <CAGkQGi+m45Ot-D+TPDAG1wJPksf1UfY8iX84bXDq9y69Uoa2Zw at mail dot gmail dot com>
Hi Paul,
Paul Richard Thomas wrote:
Have you checked that:
subroutine sub(a)
class(*),pointer :: a
a => null()
end subroutine
does not give an error? I think that it is why the check was introduced.
I haven't checked it in particular, but was relying that some test in
the library would test for it. Additionally, gfc_expr_attr() takes care
to set for BT_CLASS "pointer" only for class_pointer - which I also
checked before submittal.
In any case, your test case compiles and "grep '=>'" finds the following
NULL initializations:
unlimited_polymorphic_1.f03: u2 => NULL()
unlimited_polymorphic_1.f03: u2 => NULL(aptr)
Tobias