This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug sanitizer/81148] UBSAN: two more false positives
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Jun 2017 17:26:59 +0000
- Subject: [Bug sanitizer/81148] UBSAN: two more false positives
- Auto-submitted: auto-generated
- References: <bug-81148-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81148
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
So were in "associate:", where
lit0 = -123
lit1 = -1
which is associated to
lit0 = -124
and
var0 = null
var1 = -((long int) ~(x != 0) ^ 9223372036854775806)
which is associated to
var0 = -((long int) ~(x != 0) ^ 9223372036854775806)
Then
9765 con0 = associate_trees (loc, con0, lit0, code, atype);
9766 return
9767 fold_convert_loc (loc, type, associate_trees (loc, var0,
con0,
9768 code,
atype));
creates the bogus expression with overflow.