This is the mail archive of the
mailing list for the GCC project.
Re: [Patch, Fortran] PR34514 - prevent double initialization and dimension changes after initialization
- From: Jerry DeLisle <jvdelisle at verizon dot net>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Mon, 24 Dec 2007 06:56:29 -0800
- Subject: Re: [Patch, Fortran] PR34514 - prevent double initialization and dimension changes after initialization
- References: <4766DA91.firstname.lastname@example.org>
Tobias Burnus wrote:
It is completely unclear what value "n" has after:OK to commit
integer :: n = 4
dimension :: n(3)
similarly invalid is:
integer :: n = 5
parameter (n = 7)
This patch adds checks to reject this.
Please try to come up with things which should be rejected; I think
there are none, but I still might have missed something. ;-)
Build and regtested on x86-64. OK for the trunk?
PS: I did not check the standard, but ifort and NAG f95 reject it. As it
makes sense, I believe these compilers. If needed be, I can still try to
find it in the standard.