https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102960

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
      Known to fail|                            |10.3.0, 11.2.0, 12.0
            Summary|ICE: in sign_mask, at       |[10/11/12 Regression] ICE:
                   |wide-int.h:855 in GCC       |in sign_mask, at
                   |10.3.0                      |wide-int.h:855 in GCC
                   |                            |10.3.0
   Last reconfirmed|                            |2021-10-27
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed with 10 and above.  The code below expects minlen to be constant but
it's actually a COND_EXPR.

                      /* Adjust the minimum and maximum length determined
                         so far and the upper bound on the array size.  */
                      if (!pdata->minlen
                          || tree_int_cst_lt (argdata.minlen, pdata->minlen))
                        pdata->minlen = argdata.minlen;

The length is computed from the variable below:

 <ssa_name 0x7fffea150f30
    type <pointer_type 0x7fffea8215e8
        type <integer_type 0x7fffea821540 char readonly public type_6 QI
            size <integer_cst 0x7fffea817048 constant 8>
            unit-size <integer_cst 0x7fffea817060 constant 1>
            align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffea821540 precision:8 min <integer_cst 0x7fffea817090 -128> max
<integer_cst 0x7fffea8170c0 127>
            pointer_to_this <pointer_type 0x7fffea8215e8> reference_to_this
<reference_type 0x7fffe9d8b1f8>>
        sizes-gimplified public unsigned type_6 DI
        size <integer_cst 0x7fffea7f5f48 constant 64>
        unit-size <integer_cst 0x7fffea7f5f60 constant 8>
        align:64 warn_if_not_align:0 symtab:0 alias-set 3 canonical-type
0x7fffea8215e8
        pointer_to_this <pointer_type 0x7fffea9d5540>>
    visited var <var_decl 0x7fffe912f900 sNaN>
    def_stmt sNaN_8 = &", NaN"[commaAdjust_2];
    version:8>

Reply via email to