This is the mail archive of the gcc@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]

Re: [tree-ssa] Computed gotos


In message <200306170145.34317.paul@nowt.org>, Paul Brook writes:
 >On Monday 16 June 2003 6:18 pm, law@redhat.com wrote:
 >> In message <200306151759.45301.paul@nowt.org>, Paul Brook writes:
 >> Well, what do the tree nodes which use these addresses look like?
 >
 >We have a static array of structures which contain pointer to the labels.
 >We declare it something like
 >DECL_INITIAL(<staticvar>) =
 >CONSTRUCTOR<array>(TREE_LIST(
 >  CONSTRUCTOR<record>(TREE_LIST (
 >    FIELD_DECL, ADDR_EXPR(LABEL_DECL)))))
 >
 >Hopefully this makes some kind of sense. More detailed dumps follow.
 >I've tried to cut the following down as much as possible without loosing 
 >anything that might be important.
It makes sense :-)  I'd expect it to "just work" if you pass a copy of
the initializer down to the gimplifier.  See c-simplify.c gimplify_decl_stmt:

              /* We must still examine initializers for static variables
                 as they may contain a label address.  However, we must not
                 make any changes to the node or the queues.  So we
                 make a copy of the node before calling the gimplifier
                 and we use throw-away queues.  */
 

Jeff


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