This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Do not allow non-top-level BIT_FIELD_REFs, IMAGPART_EXPRs or REALPART_EXPRs
- From: Richard Biener <rguenther at suse dot de>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: Martin Jambor <mjambor at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 23 May 2013 11:38:10 +0200 (CEST)
- Subject: Re: [PATCH] Do not allow non-top-level BIT_FIELD_REFs, IMAGPART_EXPRs or REALPART_EXPRs
- References: <20130522151105 dot GF23266 at virgil dot suse> <4311044 dot 6dSfYhQ6mB at polaris>
On Thu, 23 May 2013, Eric Botcazou wrote:
> > earlier this week I asked on IRC whether we could have non-top-level
> > BIT_FIELD_REFs and Richi said that we could. However, when I later
> > looked at SRA code, quite apparently it is not designed to handle
> > non-top-level BIT_FIELD_REFs, IMAGPART_EXPRs or REALPART_EXPRs. So in
> > order to test whether that assumption is OK, I added the following
> > into the gimple verifier and ran bootstrap and testsuite of all
> > languages including Ada and ObjC++ on x86_64. It survived, which
> > makes me wondering whether we do not want it in trunk.
>
> This looks plausible to me, but I think that you ought to verify the real
> assumption instead, which is that the type of the 3 nodes is always scalar.
> The non-toplevelness of the nodes is merely a consequence of this property.
Yeah. But please put the verification into tree-cfg.c:verify_expr
instead.
Thanks,
Richard.