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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |tree-optimization
      Known to work|                            |10.1.0, 10.3.0
   Last reconfirmed|                            |2021-12-03
            Summary|compiler crashes when       |[11/12 Regression] compiler
                   |trying to vectorize loop    |crashes when trying to
                   |                            |vectorize loop
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |11.3
      Known to fail|                            |11.1.0, 11.2.0
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Testcase without any headers:
int crash_me(char* ptr, unsigned long size){
    short result[16] = {0};

    unsigned long no_iters = 0;
    for(unsigned long i = 0; i < size - 12; i+= 13){
        for(unsigned long j = 0; j < 12; j++){
            result[j] += ptr[i + j] - '0';
        }
        no_iters++;
    }

    int result_int = 0;
    for(int j = 0; j < 12; j++){
        int bit_value = result[j] > no_iters/2 ? 1 : 0;
        result_int |= bit_value;
    }

    return result_int;
}

Reply via email to