This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Store type in fieldoff_s, not FIELD_DECL
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 Jul 2005 10:00:19 -0400
- Subject: Re: [PATCH] Store type in fieldoff_s, not FIELD_DECL
- References: <Pine.LNX.4.58.0507251537020.21145@wotan.suse.de>
On Mon, Jul 25, 2005 at 03:39:46PM +0200, Richard Guenther wrote:
>
> This enables us to sft fields without a FIELD_DECL in future
> (aka array elements). Two parts, actually, to be applied on
> top of each other.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu.
>
> Ok for mainline?
>
Well, we are in stage3 now. Are you hoping to fix anything with
this? It's not absolutely clear to me that we won't need the
FIELD_DECL in the new alias work planned for 4.2.
> *************** create_variable_info_for (tree decl, con
> *** 3127,3140 ****
> const char *newname;
> char *tempname;
>
> ! field = fo->field;
> newindex = VEC_length (varinfo_t, varmap);
> asprintf (&tempname, "%s.%s", vi->name, alias_get_name (field));
> newname = ggc_strdup (tempname);
> free (tempname);
> newvi = new_var_info (decl, newindex, newname, newindex);
> newvi->offset = fo->offset;
> ! newvi->size = TREE_INT_CST_LOW (DECL_SIZE (field));
> newvi->fullsize = vi->fullsize;
> insert_into_field_list (vi, newvi);
> VEC_safe_push (varinfo_t, heap, varmap, newvi);
> --- 3127,3140 ----
> const char *newname;
> char *tempname;
>
> ! field = fo->type;
>
You'd have to rename the local variable 'field'.