This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ast-optimizer-branch]: Don't post-initialize static variables
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 6 May 2002 09:36:45 -0400
- Subject: Re: [ast-optimizer-branch]: Don't post-initialize static variables
- Organization: Red Hat Canada
- References: <Pine.LNX.4.44.0205042246210.10817-100000@dberlin.org>
On Sat, 04 May 2002, Daniel Berlin wrote:
> Otherwise, we transform
>
> static int label_num = 0;
>
> into
>
> static int label_num;
>
> label_num = 0;
>
> and output the same label every time (at least, we do for
> dwarf2out_cfi_label).
>
Yeah, I got this one last Fri. We also shouldn't simplify
non-scalar initializers. In fact, I'm tempted to leave
initializers alone for the time being.
OK to commit if you also add !AGGREGATE_TYPE_P (TREE_TYPE (decl))
and mirror the change in is_simple_compstmt().
Thanks. Diego.