This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: genattrtab.c [Am I on drugs?!?]
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Subject: Re: genattrtab.c [Am I on drugs?!?]
- From: Zack Weinberg <zack at bitmover dot com>
- Date: Thu, 30 Sep 1999 12:04:31 -0700
- cc: law at cygnus dot com, gcc at gcc dot gnu dot org
- References: <9909301859.AA17250@vlsi1.ultra.nyu.edu>
Richard Kenner wrote:
> No. elem is not an array of rtunions.
>
> typedef struct rtvec_def{
> int num_elem; /* number of elements */
> int gc_mark;
> struct rtx_def *elem[1];
> } *rtvec;
>
> Note carefully the type of elem. It is a struct rtx_def *. That is
> rather different than an rtunion.
>
> Since this was suspected to be a bug "forever", I was looking at the
> gcc2 sources, where it *is* an rtunion. I wonder when that
> disparity happened?
Um, I did that about a month ago; it was buried in a tree-checking
update. This change:
1999-08-19 14:44 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.h (rtvec): Make "elem" an array of rtx, not rtunion.
(RTVEC_ELT): Change to match.
(XVECEXP): Use XVEC and RTVEC_ELT.
...
I did it because the pointer slot was the only one ever used, and
HOST_WIDE_INT might be wider than a pointer, so using rtunion would
waste memory. So this isn't an old bug at all.
Graham's suggestion of changing tests to an array of rtx looks good to
me.
zw