------- Comment #14 from rguenther at suse dot de  2007-06-22 09:45 -------
Subject: Re:  [4.3 Regression] cannot take address of
 bit field

On Fri, 22 Jun 2007, hubicka at ucw dot cz wrote:

> ------- Comment #12 from hubicka at ucw dot cz  2007-06-22 09:35 -------
> Subject: Re:  [4.3 Regression] cannot take address of bit field
> 
> Hi,
> I've experimented with this a bit - the problem is that the error is
> produced during gimplification: gimplifier translates the expression
> into the addr_expr form and later gimplifying the addr_expr it calls the
> mark_addressable langhook that porudces the error.
> 
> It seems to me that this langhook call is unnecesary.  Removing it
> breaks since C++ is sometimes producing references to objects not having
> addr_expr during gimplification, but it seems to me that adding just
> generic code that takes gimple addr_expr and marks bit addressable (just
> as aliasing does) instead the full blown langhook should just work?
> 
> THe typechecking in frontend should be enough to catch this sort of
> syntax errors (when address is taken form something language prohibits).
> Does this seem sane?

Yes.  It looks like a frontend bug if the tree was not marked addressable
before gimplification but would need to after.

Richard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31541

Reply via email to