This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] PATCH: Label addresses in static initializers
- From: Paul Brook <paul at nowt dot org>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Diego Novillo <dnovillo at redhat dot com>,Jeff Law <law at redhat dot com>
- Date: Wed, 18 Jun 2003 17:43:56 +0100
- Subject: Re: [tree-ssa] PATCH: Label addresses in static initializers
- References: <200306180007.36564.paul@nowt.org> <wvlu1ao5m0r.fsf@prospero.boston.redhat.com>
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