public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23297] immediate uses hosed after CCP
       [not found] <bug-23297-10053@http.gcc.gnu.org/bugzilla/>
@ 2005-10-16 10:41 ` rguenth at gcc dot gnu dot org
  0 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-10-16 10:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2005-10-16 10:41 -------
This was "fixed" on improved-aliasing-branch.  It cannot happen on mainline,
closing as fixed (w/o a target milestone).


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/23297] immediate uses hosed after CCP
  2005-08-09 15:48 [Bug tree-optimization/23297] New: " rguenth at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-08-11  8:31 ` rguenth at gcc dot gnu dot org
@ 2005-08-11  8:32 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-08-11  8:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rguenth at gcc dot gnu dot org  2005-08-11 08:32 -------
Created an attachment (id=9470)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9470&action=view)
patch fixing the problem

This is the patch which fixes the problem.  Whether this situation can happen
with an unpatched mainline is unclear to me.  What to do with bugreports like
this as well ;)  Leaving UNCONFIRMED.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/23297] immediate uses hosed after CCP
  2005-08-09 15:48 [Bug tree-optimization/23297] New: " rguenth at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-08-10 15:56 ` amacleod at redhat dot com
@ 2005-08-11  8:31 ` rguenth at gcc dot gnu dot org
  2005-08-11  8:32 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-08-11  8:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rguenth at gcc dot gnu dot org  2005-08-11 08:30 -------
Now that you describe what is going wrong, I remember having this problem earlier.
And even a fix.  Ugh.  Sorry for bothering you.

-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/23297] immediate uses hosed after CCP
  2005-08-09 15:48 [Bug tree-optimization/23297] New: " rguenth at gcc dot gnu dot org
  2005-08-09 15:49 ` [Bug tree-optimization/23297] " rguenth at gcc dot gnu dot org
  2005-08-09 15:52 ` rguenth at gcc dot gnu dot org
@ 2005-08-10 15:56 ` amacleod at redhat dot com
  2005-08-11  8:31 ` rguenth at gcc dot gnu dot org
  2005-08-11  8:32 ` rguenth at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: amacleod at redhat dot com @ 2005-08-10 15:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From amacleod at redhat dot com  2005-08-10 15:55 -------
A quick glance shows that parse_ssa_operands() does not expect to receive a tree
that looks like:

b.c[d_5].i

get_expr_operands is called on this, and  when processing COMPONENT_REF:
       ref = okay_component_ref_for_subvars (expr, &offset, &size);
        if (ref)
          {
            subvar_t svars = get_subvars_for_var (ref);
            subvar_t sv;
            for (sv = svars; sv; sv = sv->next)
              {
                bool exact;
                if (overlap_subvar (offset, size, sv, &exact))
                  {
                    int subvar_flags = flags;
                    if (!exact)
                      subvar_flags &= ~opf_kill_def;
                    add_stmt_operand (&sv->var, s_ann, subvar_flags);
                  }
              }
          }
        else
          get_expr_operands (stmt, &TREE_OPERAND (expr, 0),
                             flags & ~opf_kill_def);

if okay_component_ref_for_subvars() is true (which it is in this case), we never
call get_expr_operands on the rest of the expression, which contains the array
ref. Therefore the operand builder never sees the use of d_5 in the expression,
and chaos breaks out as you have observed.

I dont pay much attention to the semantics of gimple, but either b.c[d_5].i is
not valid gimple, or you have to be prepared to explore the component ref deeper
in get_expr_operands.  I would have expected to trip over this earlier if it was
valid, but what do I know :-)

 

-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/23297] immediate uses hosed after CCP
  2005-08-09 15:48 [Bug tree-optimization/23297] New: " rguenth at gcc dot gnu dot org
  2005-08-09 15:49 ` [Bug tree-optimization/23297] " rguenth at gcc dot gnu dot org
@ 2005-08-09 15:52 ` rguenth at gcc dot gnu dot org
  2005-08-10 15:56 ` amacleod at redhat dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-08-09 15:52 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amacleod at redhat dot com


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug tree-optimization/23297] immediate uses hosed after CCP
  2005-08-09 15:48 [Bug tree-optimization/23297] New: " rguenth at gcc dot gnu dot org
@ 2005-08-09 15:49 ` rguenth at gcc dot gnu dot org
  2005-08-09 15:52 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-08-09 15:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rguenth at gcc dot gnu dot org  2005-08-09 15:49 -------
Created an attachment (id=9455)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9455&action=view)
patch to enable salias for structures which contain arrays

required patch to reproduce the ICE.

-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-10-16 10:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23297-10053@http.gcc.gnu.org/bugzilla/>
2005-10-16 10:41 ` [Bug tree-optimization/23297] immediate uses hosed after CCP rguenth at gcc dot gnu dot org
2005-08-09 15:48 [Bug tree-optimization/23297] New: " rguenth at gcc dot gnu dot org
2005-08-09 15:49 ` [Bug tree-optimization/23297] " rguenth at gcc dot gnu dot org
2005-08-09 15:52 ` rguenth at gcc dot gnu dot org
2005-08-10 15:56 ` amacleod at redhat dot com
2005-08-11  8:31 ` rguenth at gcc dot gnu dot org
2005-08-11  8:32 ` rguenth at gcc dot gnu dot org

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).