This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]