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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at it dot uu.se

--- Comment #3 from Mikael Pettersson <mikpe at it dot uu.se> 2011-09-24 
13:17:36 UTC ---
This still ICEs gcc-4.6-20110923, but stopped ICEing trunk with the
tree-ssa-forwprop optimization improvement in r174428:

http://gcc.gnu.org/ml/gcc-cvs/2011-05/msg01209.html

However the underlying issue remains.  The ARM cstoredi4 expander has a very
loose operand match spec which allows both operands to be constants, but that
case doesn't work(*), so it has a gcc_assert () to cause an error in that case.
But asserting is wrong: it should either use stricter operand specs to avoid
undesirable operand combinations, or FAIL the expander for such operands.

Replacing the assert with a FAIL on the negated condition seem appropriate and
fixes this test case for me.

[(*) Simply removing the gcc_assert in 4.6.1 leads to

pr49069.i: In function 'foo':
pr49069.i:26:1: error: unrecognizable insn:
(insn 8 7 9 3 (set (reg:CC 24 cc)
        (compare:CC (const_int 0 [0])
            (const_int 1 [0x1]))) pr49069.i:23 -1
     (nil))
pr49069.i:26:1: internal compiler error: in extract_insn, at recog.c:2109]

Reply via email to