[patch, gfortran] PRs 15975 & 16606

Erik Edelmann eedelman@acclab.helsinki.fi
Sat Sep 17 16:20:00 GMT 2005


paulthomas2@wanadoo.fr wrote:
> >2005-09-16 Erik Edelmann <erik.edelmann@iki.fi>
> >
> >       PR fortran/15975
> >       PR fortran/16606
> >       * resolve.c (resolve_symbol): Don't assign default
> >         initializer to pointers.
> >
> Just as I got told off for claiming separate fixes for repeat PRs, so 
> should you........! Just the PR15795, please, Erik.

Ok.  I hadn't read that discussion (I assume you are referring to
Tobi's comments to your "PRs 19358, 19477, 21211 and 21622
(+15502?)" patch) very thoroughly; sorry for that.

> >! { dg-do compile }
> >
> >! PR 15975, PR 16606
> >! Pointers to derived types with initialized components
> >SUBROUTINE N
> > TYPE T
> >   INTEGER :: I = 0
> > END TYPE T
> > TYPE(T), POINTER :: P
> >END SUBROUTINE N
> >
> I have this slight nervousness about tests that merely check that 
> something compiles.  Is it not better to check the functionality with 
> the likes of the test below?
> 
> ! { dg-do run }
> ! PR 15975, PR 16606
> ! Pointers to derived types with initialized components
> SUBROUTINE N
>  TYPE T
>    INTEGER :: I = 99
>  END TYPE T
>  TYPE(T), POINTER :: P
>  TYPE(T), TARGET  :: Q
>  P => Q
>  if (P%I.ne.99) call abort ()
> END SUBROUTINE N
> 
> program test_pr15975
>  call n ()
> end program test_pr15975

Yes, I agree this test case is better.

> Apart from these two remarks, this is OK - it even does what is claimed 
> for it.
> 
> Do you not have cvs commit permission?  I'll do the honours for you 
> tomorrow night, if not.  

I don't have commit permission.  If you could commit it, it would
be nice.

> It will have to be mainline for now.  Could you 
> remind me, when 4.03 is open, please?

Ok, I'll do that!


        Thanks,
        Erik



More information about the Fortran mailing list