[Patch, Fortran, F08] PR 45290: pointer initialization

Janus Weil janus@gcc.gnu.org
Mon Feb 7 10:00:00 GMT 2011


Hi all,

the attached patch fixes one remaining problem with F08 (non-NULL)
pointer initialization: The F08 standard forbids using pointers as
initialization target in pointer initialization statements, which we
failed to detect up to now. Implementation is straightforward, once
you know how to read the standard in this matter. The patch was
regtested on x86_64-unknown-linux-gnu. Ok for trunk?

Cheers,
Janus


2011-02-07  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/45290
	* expr.c (gfc_check_assign_symbol): Reject pointers as pointer
	initialization target.


2011-02-07  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/45290
	* gfortran.dg/pointer_init_6.f90: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr45290.diff
Type: application/octet-stream
Size: 1012 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110207/0a55641a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pointer_init_6.f90
Type: application/octet-stream
Size: 812 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20110207/0a55641a/attachment-0001.obj>


More information about the Fortran mailing list