[patch,fortran]PR25057 default initialization and DATA statement conflict

Jerry DeLisle jvdelisle@verizon.net
Tue Dec 12 02:47:00 GMT 2006


Jerry DeLisle wrote:
> The attached patch fixes this bug by providing an appropriate error 
> message. This is related to pr24978, but needs to be handled a little 
> differently to give a better error message.  This is round one of 
> probably several patches to catch these invalid cases.
> 
> Regression tested on x86-64-linux.  OK for trunk?
> 
I am withdrawing this patch.  I found a case where this does not work.

In a situation like this:

         type tmp
           integer, dimension(4)::a
           real :: r = 1.0
         end type

type (tmp1) tmp2

Followed by a DATA statement that initialize the 'a' , the patch issues an 
error, even though 'a' has not been initialized previously.

Back to the drawing board.  I will have to catch this case with the other patch 
I am working on which should (ha ha) handle all cases.  Derived types is the 
most difficult portion.

Jerry



More information about the Fortran mailing list