* [PATCH] Avoid setting first GIMPLE_DEBUG operand to MEM_REF in lto streaming (PR lto/46879)
@ 2010-12-10 20:00 Jakub Jelinek
2010-12-13 16:45 ` Richard Guenther
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2010-12-10 20:00 UTC (permalink / raw)
To: gcc-patches
Hi!
The first operand of GIMPLE_DEBUG must be a DECL, not a MEM_REF, so the
DECL -> MEM_REF replacement output_gimple_stmt does is wrong for it.
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?
2010-12-10 Jakub Jelinek <jakub@redhat.com>
PR lto/46879
* lto-streamer-out.c (output_gimple_stmt): Never replace first
GIMPLE_DEBUG argument with MEM_REF.
--- gcc/lto-streamer-out.c.jj 2010-12-02 11:51:31.000000000 +0100
+++ gcc/lto-streamer-out.c 2010-12-10 17:13:32.000000000 +0100
@@ -1759,8 +1759,9 @@ output_gimple_stmt (struct output_block
tree op = gimple_op (stmt, i);
/* Wrap all uses of non-automatic variables inside MEM_REFs
so that we do not have to deal with type mismatches on
- merged symbols during IL read in. */
- if (op)
+ merged symbols during IL read in. The first operand
+ of GIMPLE_DEBUG must be a decl, not MEM_REF, though. */
+ if (op && (i || !is_gimple_debug (stmt)))
{
tree *basep = &op;
while (handled_component_p (*basep))
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Avoid setting first GIMPLE_DEBUG operand to MEM_REF in lto streaming (PR lto/46879)
2010-12-10 20:00 [PATCH] Avoid setting first GIMPLE_DEBUG operand to MEM_REF in lto streaming (PR lto/46879) Jakub Jelinek
@ 2010-12-13 16:45 ` Richard Guenther
0 siblings, 0 replies; 2+ messages in thread
From: Richard Guenther @ 2010-12-13 16:45 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: gcc-patches
On Fri, Dec 10, 2010 at 8:49 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> The first operand of GIMPLE_DEBUG must be a DECL, not a MEM_REF, so the
> DECL -> MEM_REF replacement output_gimple_stmt does is wrong for it.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk?
Ok.
Thanks,
Richard.
> 2010-12-10 Jakub Jelinek <jakub@redhat.com>
>
> PR lto/46879
> * lto-streamer-out.c (output_gimple_stmt): Never replace first
> GIMPLE_DEBUG argument with MEM_REF.
>
> --- gcc/lto-streamer-out.c.jj 2010-12-02 11:51:31.000000000 +0100
> +++ gcc/lto-streamer-out.c 2010-12-10 17:13:32.000000000 +0100
> @@ -1759,8 +1759,9 @@ output_gimple_stmt (struct output_block
> tree op = gimple_op (stmt, i);
> /* Wrap all uses of non-automatic variables inside MEM_REFs
> so that we do not have to deal with type mismatches on
> - merged symbols during IL read in. */
> - if (op)
> + merged symbols during IL read in. The first operand
> + of GIMPLE_DEBUG must be a decl, not MEM_REF, though. */
> + if (op && (i || !is_gimple_debug (stmt)))
> {
> tree *basep = &op;
> while (handled_component_p (*basep))
>
> Jakub
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-13 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-10 20:00 [PATCH] Avoid setting first GIMPLE_DEBUG operand to MEM_REF in lto streaming (PR lto/46879) Jakub Jelinek
2010-12-13 16:45 ` Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).