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]

Problem with tree-ssa-ccp.c:replace_uses_in


The return parameter, replaced_address_p is set when an address is
replaced.  But it's used to see if we have a statement that might have
used to throw but now doesn't.

However, that's not a sufficient condition in the -fnon-call-exceptions
case.  When compiling the ACATS test c97114a, we have in .t39.phiopt2
the statement T.82_90 = S0.ARRAY[T.81_89]{lb: 1 sz: 8}.s

because of the variable index, this might trap.  But CCP is propagating
the constant "1" into the index.  So now it can't trap.  But it's marked
as possible trapping.  This causes an ICE.

Note that it's not just the index, but also the low bound whose replacement
would make the statement no longer trap (and the offset in a COMPONENT_REF,
though we currently don't consider that trapping, which is probably a bug).


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