This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 4/5] Downgrade value_expr_for_decl to non-cache
- From: Michael Matz <matz at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Tom de Vries <Tom_deVries at mentor dot com>, "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>
- Date: Wed, 15 Jul 2015 16:43:51 +0200 (CEST)
- Subject: Re: [PATCH 4/5] Downgrade value_expr_for_decl to non-cache
- Authentication-results: sourceware.org; auth=none
- References: <55A28B9E dot 1030706 at mentor dot com> <55A28D67 dot 7010001 at mentor dot com> <CAFiYyc2tdcbsdK+OTfBZ9tu1SjeiCfAoB-8F8pMEncZemcobyQ at mail dot gmail dot com> <CAFiYyc15rJ5D0Np=_rWOxW1ywUHvAtf9Vaa88P7gH21BscMP_A at mail dot gmail dot com> <alpine dot LSU dot 2 dot 20 dot 1507151611250 dot 23227 at wotan dot suse dot de> <20150715141732 dot GV1788 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 20 dot 1507151621350 dot 23227 at wotan dot suse dot de> <20150715143240 dot GW1788 at tucnak dot redhat dot com>
Hi,
On Wed, 15 Jul 2015, Jakub Jelinek wrote:
> > No, I really meant value. If you think it has meaning, then tell me
> > what it is for DECL_VALUE_EXPR (X) to be 'Y', if Y is nowhere else
> > mentioned, neither in code, nor in local-decls, nor in globals, or
> > anywhere else that would be reachable by GC.
>
> Pretty much anything, DECL_VALUE_EXPR (X) is some expression.
> It can be some_var[some_other_var], *some_var, ptr->foo, etc.
> just to list a few of the ones currently in use.
Yes, I know all that. I haven't made myself clear, if 'Y' above is a
decl, and it's mentioned nowhere else (so it has no place and has no
value), then what meaning could possibly be given to DECL_VALUE_EXPR(X) if
it were 'Y'?
Similar for "ptr->foo" if "ptr" is nowhere mentioned in code or tables.
In effect DECL_VALUE_EXPR refers to stale decls that aren't initialized,
aren't given a place and aren't dealt with in code.
> DECL_DEBUG_EXPR can also be __imag__ somevar, __real__ somevar,
> something.field, etc.
Sure, and the same applies, if "something" is a stale decl, then what's
the meaning of "something.field" in DECL_DEBUG_EXPR?
Ciao,
Michael.