[Patch, Fortran] PR 32460 - Check PRIVATE attribute for derived components

Bernhard Fischer rep.dot.nop@gmail.com
Sat Jun 23 20:03:00 GMT 2007


On Sat, Jun 23, 2007 at 06:07:49PM +0200, Tobias Burnus wrote:
>:ADDPATCH fortran:
>
>The initial problem (PR 32460) was that structure constructors where
>accepted for derived types where all components are private (private
>statement). - Thanks Daniel for finding this.
>
>I then saw that for components with private attribute (!) the "private"
>was completely ignored ...
>(The latter is by the way a Fortran 2003 feature supported by only few
>compilers.)

>Index: gcc/fortran/primary.c
>===================================================================
>--- gcc/fortran/primary.c	(Revision 125971)
>+++ gcc/fortran/primary.c	(Arbeitskopie)
>@@ -1888,6 +1888,7 @@ gfc_match_structure_constructor (gfc_sym
>   gfc_expr *e;
>   locus where;
>   match m;
>+  int private_comp = 0;

bool?



More information about the Gcc-patches mailing list