This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/41807] [4.5/4.4 Regression] data statement with nested type constructors



------- Comment #17 from sgk at troutmask dot apl dot washington dot edu  2009-11-17 06:03 -------
Subject: Re:  [4.5/4.4 Regression]  data statement with nested type
constructors

On Tue, Nov 17, 2009 at 05:35:33AM -0000, jvdelisle at gcc dot gnu dot org
wrote:
> 
>- Comment #16 from jvdelisle at gcc dot gnu dot org  2009-11-17 05:35 -------
> I propose fixing this at gfc_consant_ac which has the following comment:
> 
> /* Given an array constructor, determine if the constructor is
>    constant or not by expanding it and making sure that all elements
>    are constants.  This is a bit of a hack since something like (/ (i,
>    i=1,100000000) /) will take a while as* opposed to a more clever
>    function that traverses the expression tree. FIXME.  */
> 
> We should just be able to traverse the expression tree.  I have
> manually done so with a few test cases and one does indeed end up
> with a BT_CONSTANT.  I will see what I can come up with.
> 

Be careful, if I remember correctly, this can be an O(n**2)
problem.  OTOH, nice sleuthing!


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41807


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]