liushuyu wrote:

Hi there,

It seems like after this pull request, the following C code will crash LLVM if 
LLVM assertion is enabled:

Godbolt link: https://godbolt.org/z/91bqnYsb4

```c
#include <stdint.h>
#include <stddef.h>

#if SIZE_MAX != UINT32_MAX
#error "This reproducer only works on 32-bit targets"
#endif

void repro(unsigned char** arg0) {
    #pragma clang loop unroll(disable)
    for (size_t i = 0; i != INT32_MAX / 2 + 1; i++) {
        *arg0[i] = 0;
        arg0[i] = 0;
    }
}
```

Reduced LLVM IR that can trigger the issue: https://godbolt.org/z/aj364W849

https://github.com/llvm/llvm-project/pull/119365
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to