This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PARM_DECL of DECL_SIZE 0, but TYPE_SIZE of 96 bits
- From: Richard Henderson <rth at redhat dot com>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: Gcc Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 29 Jun 2005 16:55:04 -0700
- Subject: Re: PARM_DECL of DECL_SIZE 0, but TYPE_SIZE of 96 bits
- References: <1120085832.7612.81.camel@linux-009002219098>
On Wed, Jun 29, 2005 at 06:57:12PM -0400, Daniel Berlin wrote:
> I'm going to work around this by using TYPE_SIZE, but it would be nice
> if somebody could explain the purpose for this behavior (if it's a bug,
> i'll file a bug report). I would imagine we don't have truly empty
> things in C++, so you could simply assert that TREE_INT_CST_LOW of
> whatever you are setting DECL_SIZE to is not 0 and find these that way.
It is most definitely a bug. I'm surprised about the 0 instead
of a NULL there. The later would easily be explicable by
forgetting to call layout_decl.
My only guess is that this decl had an incomplete type at some
point. Is the function in question a template? I could see as
how maybe we need to call relayout_decl after instantiation, or
simply re-order how the parm_decls are created.
r~