This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sanitizer/81148] UBSAN: two more false positives


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81148

--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
Folding

-123 - (((long int) ~(x != 0) ^ 9223372036854775806) + 1)

results in split_tree of (((long int) ~(x != 0) ^ 9223372036854775806) + 1)
returning -((long int) ~(x != 0) ^ 9223372036854775806) and minus_lit1 == 1.

The bug is obviously negating of 'var'.

I don't see any way around handling var and con like lit, thus adding
minus_var and minus_con and appropriately using MINUS_EXPR when
associating.

Bah.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]