This is the mail archive of the gcc-patches@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] PATCH: Label addresses in static initializers


On Wednesday 18 June 2003 12:20 am, Jason Merrill wrote:
> On Wed, 18 Jun 2003 00:07:36 +0100, Paul Brook <paul@nowt.org> wrote:
> > 2003-06-17  Paul Brook  <paul@nowt.org>
> >
> > 	* gimplify.c (gimplify_bind_expr): Look inside static initializers.
>
> Yep, this function doesn't properly deal with GENERIC yet.  But the way
> to fix it is to remove initializers that can't be applied at compile time
> and move them into a MODIFY_EXPR, as gimplify_decl_stmt does for C.

That's not the purpose if this patch.
This is for the initializers that are applied at compile time, ie those that 
can't be converted into a MODIFY_EXPR because they have static storage. We 
need to pass these through the gimplifier to make we mark any labels who's 
address is taken. 

Admittedly running these initializers through the gimplifier is like 
cracking a nut with a sledgehammer, but it works and it's exactly what the 
C frontend does in gimplify_decl_stmt.

Paul


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