From: Richard Guenther <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix PR44890
Date: Fri, 09 Jul 2010 18:31:00 -0000 [thread overview]
Message-ID: <alpine.LNX.2.00.1007092030180.1429@zhemvz.fhfr.qr> (raw)
This fixes PR44890 - IVOPTs still sometimes creates non-pointer
induction variables for TMR_BASE.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
2010-07-09 Richard Guenther <rguenther@suse.de>
PR middle-end/44890
* tree-ssa-address.c (create_mem_ref_raw): Only build a MEM_REF
if base is a pointer.
* tree-cfg.c (verify_expr): Update MEM_REF checking.
Index: gcc/tree-ssa-address.c
===================================================================
--- gcc/tree-ssa-address.c (revision 161994)
+++ gcc/tree-ssa-address.c (working copy)
@@ -352,7 +352,8 @@ create_mem_ref_raw (tree type, tree alia
/* If possible use a plain MEM_REF instead of a TARGET_MEM_REF. */
if (alias_ptr_type
&& !addr->index
- && !addr->step)
+ && !addr->step
+ && (!addr->base || POINTER_TYPE_P (TREE_TYPE (addr->base))))
{
tree base, offset;
gcc_assert (!addr->symbol ^ !addr->base);
Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c (revision 161994)
+++ gcc/tree-cfg.c (working copy)
@@ -2610,7 +2679,8 @@ verify_expr (tree *tp, int *walk_subtree
case MEM_REF:
x = TREE_OPERAND (t, 0);
- if (!is_gimple_mem_ref_addr (x))
+ if (!POINTER_TYPE_P (TREE_TYPE (x))
+ || !is_gimple_mem_ref_addr (x))
{
error ("Invalid first operand of MEM_REF.");
return x;
reply other threads:[~2010-07-09 18:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.00.1007092030180.1429@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).