[Bug fortran/50960] [OOP] vtables not marked as constant
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 2 15:16:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50960
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-11-02 15:16:08 UTC ---
(In reply to comment #5)
> (In reply to comment #1)
> > - if (gfc_add_flavor (&vtab->attr, FL_VARIABLE, NULL,
> > + if (gfc_add_flavor (&vtab->attr, FL_PARAMETER, NULL,
>
> (In reply to comment #3)
> > it is not TREE_READONLY.
>
> I wonder whether there is a general missed-optimization issue for FL_PARAMETER
> (for the case they are stored as actual data and not just as drop-in number).
> One might need some special handling, but I also do not see "para"
> ("__m_MOD_para:") marked as .rodata for
>
> module m
> integer, parameter :: PARA(*) = [1,2,3,4,5,6,7,8,9,10]
> end module m
>
> use m
> print *, para
> end
Definitely a missed optimization. Optimizers will not be able to
propagate constants from that initializer.
More information about the Gcc-bugs
mailing list