This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] crash in coalesce_abnormal_edges, merge frommainline?


On Wed, 2003-09-10 at 09:48, Andrew MacLeod wrote:
> On Wed, 2003-09-10 at 09:39, Diego Novillo wrote:
> > On Wed, 2003-09-10 at 09:32, Gerald Pfeifer wrote:
> > 
> > > I cannot publish sources, but will happilly provide the .ii file to any
> > > developer who wants to have a look.
> > > 
> > That's Andrew's baby.  I'd be happy to take a look as well.
> > 
> 
> I'll take a look, send me the file. someone is clearly doing something
> bad. :-)   I dont suppose one of the extra messages is a warning about
> an SSA variable that is live on entry and also has a definition... That
> would be too lucky :-)
> 

The problem appears to be that PRE has created temporaries that are live
across abnormal edges, but hasn't set the bit indicating that the
variable is such, and therefore shouldn't be copy-propagated.  Copyprop
therefore sees an opportunity to propagate a temporary into the PHI and
does so, and then we catch the problem.


I'd suggest sending Dan a copy of the file, and using -fno-tree-pre
until it's been fixed.


            try
              {

                # BLOCK 1734.  PRED: 1733.  SUCC: 1735.
                pretmp.12631_217348 = yyvsp_47 + -4B;
                T.11763_74288 = pretmp.12631_217348;
<...>
finally
              {

                # BLOCK 1740.  PRED: 1739(ab).  SUCC: 1742(ab).
                (void)0
              };
          }
        else
          {

            # BLOCK 1741 (parser.y:1592).  PRED: 1732.  SUCC: 1742.

            #   yyval_181264 = VDEF <yyval_181027>;
            yyval.weights = 0B;
            pretmp.12631_217342 = yyvsp_47 + -4B;
          };

        # BLOCK 1742 (parser.y:1594).  PRED: 1740(ab) 1741.  SUCC: 1746 1743.
<...>
        #   pretmp.12631_217334 = PHI <T.11763_74288(1740), pretmp.12631_217342(1741)>

And the report is:

Different root vars 'pretmp.12631' and 'T.11763' across an abnormal edge from BB1740->BB1742

In file included from dl.C:204:
parser.c: In function `int yyparse()':
parser.c:3724: internal compiler error: in coalesce_abnormal_edges, at tree-ssa.c:1263
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

pretmp.12631 needs to have the SSA_NAME_OCCURS_IN_ABNORMAL_PHI() bit set.


Now, that being said, this also points out an interesting thing...

At the point PRE runs, the edge is marked abonormal, but it wasn't
before the DOM optimizations. According to the listing, it isn't *after*
the DOM optimizations either. Is there a run of DCE after DOM, but
before PRE?  which means it in a later listing right, and not too
obvious. ANyway, it looks like we have a few more abnormal edges than we
need. These stmts are inside a try finally block, but there are no calls
or anything else inside the try, so Im not sure why we are marking the
fallthru from the try into the finally as abnormal... perhaps we simply
can't see through the TRY/CATCH TRY/FINALLY's that are nested at this
point yet.

Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]