https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82765
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Priority|P3 |P2 Component|tree-optimization |c Version|unknown |8.0 Target Milestone|--- |6.5 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- I believe this is a frontend bug. We're parsing the literal into a __int128 type and using that to index the array. IMHO the FE should truncate array indices to a type equal or smaller than sizetype given the domain type of the array is <integer_type 0x7ffff68b4dc8 type <integer_type 0x7ffff68a9000 sizetype public unsigned DI size <integer_cst 0x7ffff6891cd8 constant 64> unit-size <integer_cst 0x7ffff6891cf0 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff68a9000 precision:64 min <integer_cst 0x7ffff6891d08 0> max <integer_cst 0x7ffff68934c0 18446744073709551615>> DI size <integer_cst 0x7ffff6891cd8 64> unit-size <integer_cst 0x7ffff6891cf0 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff68b4dc8 precision:64 min <integer_cst 0x7ffff6891d08 0> max <integer_cst 0x7ffff6891d08 0>>