public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/52693] Wrong code with SRA and arrays
Date: Fri, 23 Mar 2012 22:46:00 -0000	[thread overview]
Message-ID: <bug-52693-4-BWBRJ2ehBC@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52693-4@http.gcc.gnu.org/bugzilla/>

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|mjambor at suse dot cz      |jamborm at gcc dot gnu.org

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-03-23 22:30:08 UTC ---
(In reply to comment #0)
> With the attach testcase, SRA does the following replacement which seems wrong:
>   value = stack.l[D.4470_102];
> With
>   value_77 = MEM[(struct exprList_s *)&stack];
>   value$u_620 = MEM[(struct exprList_s *)&stack].u;
> 

It is confusing but I do not think it is wrong.  When you disable the
special handling of enumeral types in analyze_access_subtree, you get
(in this case IMHO equivalent):

  value$type_621 = MEM[(struct exprList_s *)&stack].type;
  value$u_622 = MEM[(struct exprList_s *)&stack].u;

which is exactly what we'd expect when breaking value into the two
components it consists of.  And the testcase still fails.

It is equivalent because the first MEM_REF is of type unsigned int,
whereas the second one loads the whole structure and then there's a
COMPONENT_REF to load only the second integer from it.


  parent reply	other threads:[~2012-03-23 22:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 20:51 [Bug middle-end/52693] New: " pinskia at gcc dot gnu.org
2012-03-23 20:56 ` [Bug middle-end/52693] " pinskia at gcc dot gnu.org
2012-03-23 21:18 ` pinskia at gcc dot gnu.org
2012-03-23 22:46 ` jamborm at gcc dot gnu.org [this message]
2012-03-23 22:49 ` jamborm at gcc dot gnu.org
2012-03-23 23:05 ` pinskia at gcc dot gnu.org
2012-03-24  0:52 ` jamborm at gcc dot gnu.org
2012-03-24  3:10 ` jamborm at gcc dot gnu.org
2012-03-27 18:40 ` jamborm at gcc dot gnu.org
2012-03-28 15:25 ` jamborm at gcc dot gnu.org
2012-03-28 18:21 ` jamborm at gcc dot gnu.org
2012-03-28 18:23 ` jamborm at gcc dot gnu.org
2012-03-28 19:04 ` jamborm at gcc dot gnu.org
2012-04-18 13:15 ` jamborm at gcc dot gnu.org

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=bug-52693-4-BWBRJ2ehBC@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).