https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98549
--- Comment #9 from Segher Boessenkool <segher at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #6) > The warning often warns on dead code. > But even if the warning is right, that doesn't make it ice-on-invalid-code. > The code may have UB at runtime, but that UB doesn't need to be ever > triggered when running the program. That does not make it valid code. > ice-on-invalid-code stands for code that should be rejected (diagnosed with > errors, not warnings), but instead of giving the error we ICE on it instead. > That is not the case here. The documentation says ice-on-invalid-code ICE on code that is not valid which is true here. Anyway: unsigned long xor_buf_y[1]; ... typecast_copy(xor_buf_y, in, 4); which obviously is an out-of-bounds access. But there are even worse things: char *__trans_tmp_2; memcpy(__trans_tmp_2, S2, 32); (accessing an uninitialised variable). So no, there is no way I can consider this a P1.