Message ID | BANLkTimik4atfh8Vx5scAfJedWCr1zSCHg@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Tue, Jun 21, 2011 at 12:29:01AM +0200, Janus Weil wrote: > Hi all, > > while I continue working on some of the yet unsolved parts of this PR, > I'm already posting a simple patch which fixes the part with > "duplicate save" warnings on CLASS variables (which is a regression on > 4.6 and trunk). The warnings are silenced by making the vtab and > default initialization symbols SAVE_IMPLICIT (right now they falsely > are SAVE_EXPLICIT). This is a pretty obvious fix, and rather safe to > apply to trunk, I think. > > However, I would also like to apply it to the 4.6 branch (which was > frozen a few hours ago). Is there any chance to get approval by the > RM's for this? > > In any case, the patch was regtested on x86_64-unknown-linux-gnu. I'll > commit to trunk as obvious tomorrow. > Janus, You should ping richi or jakub on IRC (#gcc channel). That being said, I think that it is too late in the process to include it in 4.6.1.
On Tue, Jun 21, 2011 at 12:29:01AM +0200, Janus Weil wrote: > However, I would also like to apply it to the 4.6 branch (which was > frozen a few hours ago). Is there any chance to get approval by the > RM's for this? Yeah, it looks small and safe enough for 4.6.1 to me. > 2011-06-21 Janus Weil <janus@gcc.gnu.org> > > PR fortran/49112 > * class.c (gfc_find_derived_vtab): Make vtab and default initialization > symbols SAVE_IMPLICIT. > > 2011-06-21 Janus Weil <janus@gcc.gnu.org> > > PR fortran/49112 > * gfortran.dg/class_44.f03: New. > Index: gcc/fortran/class.c > =================================================================== > --- gcc/fortran/class.c (revision 175227) > +++ gcc/fortran/class.c (working copy) > @@ -428,7 +428,7 @@ gfc_find_derived_vtab (gfc_symbol *derived) > &gfc_current_locus) == FAILURE) > goto cleanup; > vtab->attr.target = 1; > - vtab->attr.save = SAVE_EXPLICIT; > + vtab->attr.save = SAVE_IMPLICIT; > vtab->attr.vtab = 1; > vtab->attr.access = ACCESS_PUBLIC; > gfc_set_sym_referenced (vtab); > @@ -516,7 +516,7 @@ gfc_find_derived_vtab (gfc_symbol *derived) > sprintf (name, "__def_init_%s", tname); > gfc_get_symbol (name, ns, &def_init); > def_init->attr.target = 1; > - def_init->attr.save = SAVE_EXPLICIT; > + def_init->attr.save = SAVE_IMPLICIT; > def_init->attr.access = ACCESS_PUBLIC; > def_init->attr.flavor = FL_VARIABLE; > gfc_set_sym_referenced (def_init); Jakub
2011/6/21 Jakub Jelinek <jakub@redhat.com>: > On Tue, Jun 21, 2011 at 12:29:01AM +0200, Janus Weil wrote: >> However, I would also like to apply it to the 4.6 branch (which was >> frozen a few hours ago). Is there any chance to get approval by the >> RM's for this? > > Yeah, it looks small and safe enough for 4.6.1 to me. Thanks a lot. Fixed on trunk and 4.6 (r175257+59). Cheers, Janus
Index: gcc/fortran/class.c =================================================================== --- gcc/fortran/class.c (revision 175227) +++ gcc/fortran/class.c (working copy) @@ -428,7 +428,7 @@ gfc_find_derived_vtab (gfc_symbol *derived) &gfc_current_locus) == FAILURE) goto cleanup; vtab->attr.target = 1; - vtab->attr.save = SAVE_EXPLICIT; + vtab->attr.save = SAVE_IMPLICIT; vtab->attr.vtab = 1; vtab->attr.access = ACCESS_PUBLIC; gfc_set_sym_referenced (vtab); @@ -516,7 +516,7 @@ gfc_find_derived_vtab (gfc_symbol *derived) sprintf (name, "__def_init_%s", tname); gfc_get_symbol (name, ns, &def_init); def_init->attr.target = 1; - def_init->attr.save = SAVE_EXPLICIT; + def_init->attr.save = SAVE_IMPLICIT; def_init->attr.access = ACCESS_PUBLIC; def_init->attr.flavor = FL_VARIABLE; gfc_set_sym_referenced (def_init);