On Fri, 2025-03-14 at 15:22 +0100, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs in cmp_csts_same_type because > RAW_DATA_CST > isn't handled there. As TREE_TYPE (cst1) in that case is > INTEGER_TYPE, > e.g. char/signed char/unsigned char, the type itself doesn't imply > the size, so the length is compared first, followed by comparing the > data. > While at it, I've noticed STRING_CST handling is wrong, because > STRING_CST > can represent even string literals with embedded nul characters. > We shouldn't stop at those, hence memcmp. > While for STRING_CST TREE_TYPE should likely already imply the length > and so same type should imply same TREE_STRING_LENGTH, I've repeated > the comparisons in there just in case. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
Thanks, LGTM Dave