[gfortran, patch] PR 25093: PUBLIC function of PRIVATE type

Paul Thomas paulthomas2@wanadoo.fr
Sun Jan 8 17:11:00 GMT 2006


Erik

:REVIEWMAIL:

>:ADDPATCH fortran:
>
>Here's a little patch to fix PR 25093; PUBLIC functions were
>allowed to be of PRIVATE type. This patch inserts a check for
>this in resolve.c (resolve_fntype).
>  
>
Great - it was one of the quickies that I had in my sights.  OK for 4.1 
and trunk.

Paul

PS

>! { dg-do compile }
>! PR 25093: Check that a PUBLIC function can't be of PRIVATE type
>module m1
>
>    type :: t1
>        integer :: i
>    end type t1
>
>    private :: t1
>    public :: f1     ! { dg-error "cannot be of PRIVATE type" }
>
>contains
>
>    type(t1) function f1()
>    end function
>
>end module
>  
>
Has anybody made measurements of timing of the testsuite?  Should we be 
starting to concatenate such tests of constraints and conditions to make 
the testsuite roll more quickly? 




More information about the Gcc-patches mailing list