https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117283
--- Comment #6 from Yibo He <yibohe at pku dot edu.cn> --- (In reply to xu...@eswincomputing.com from comment #3) > (In reply to Yibo He from comment #1) > > The data initialization is long, because I find that this bug is triggered > > when long data input. If anyone has a better submission format for code like > > this, please let me know. > > Could you please provide a more detailed description? Have you analyzed > which specific part of the assembly code caused the error? see the following assembly (line 75-82 when `-O3` in https://godbolt.org/z/4h3K4E1dP) ``` lui a4,%hi(a) lui a5,%hi(b) lui a6,%hi(d) addi a4,a4,%lo(a) addi a7,a5,%lo(b) addi a6,a6,%lo(d) addi a5,s0,%lo(c) addi a1,s0,%lo(c) ``` The address of vector a is calculated `addi a1,s0,%lo(c)`. So only low 12 bits is valid. I think that is why the code can successfully deal with a small length of data. When dataLen is more than 512, the bug is triggered.