public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug sanitizer/64289] New: ICE with -fsanitize=float-cast-overflow @ 2014-12-12 16:10 jakub at gcc dot gnu.org 2014-12-12 16:11 ` [Bug sanitizer/64289] " jakub at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: jakub at gcc dot gnu.org @ 2014-12-12 16:10 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64289 Bug ID: 64289 Summary: ICE with -fsanitize=float-cast-overflow Product: gcc Version: 5.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: sanitizer Assignee: jakub at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, mpolacek at gcc dot gnu.org /* { dg-do compile } */ /* { dg-options "-fsanitize=float-cast-overflow" } */ int foo (int a) { return (int) (0 ? 0 : a ? a : 0.5); } ICEs when compiled as C, because save_expr must not be used until c_fully_fold. Unfortunately as convert.c is shared by all FEs, it can't call c_save_expr instead. So, either we'd need to turn it into a langhook, or we need a workaround in c-convert.c like we've done already for the other save_expr in convert.c case. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug sanitizer/64289] ICE with -fsanitize=float-cast-overflow 2014-12-12 16:10 [Bug sanitizer/64289] New: ICE with -fsanitize=float-cast-overflow jakub at gcc dot gnu.org @ 2014-12-12 16:11 ` jakub at gcc dot gnu.org 2014-12-12 16:19 ` jakub at gcc dot gnu.org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: jakub at gcc dot gnu.org @ 2014-12-12 16:11 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64289 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-12-12 Target Milestone|--- |5.0 Ever confirmed|0 |1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug sanitizer/64289] ICE with -fsanitize=float-cast-overflow 2014-12-12 16:10 [Bug sanitizer/64289] New: ICE with -fsanitize=float-cast-overflow jakub at gcc dot gnu.org 2014-12-12 16:11 ` [Bug sanitizer/64289] " jakub at gcc dot gnu.org @ 2014-12-12 16:19 ` jakub at gcc dot gnu.org 2014-12-17 9:27 ` jakub at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: jakub at gcc dot gnu.org @ 2014-12-12 16:19 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64289 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 34267 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34267&action=edit gcc5-pr64289.patch Untested fix. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug sanitizer/64289] ICE with -fsanitize=float-cast-overflow 2014-12-12 16:10 [Bug sanitizer/64289] New: ICE with -fsanitize=float-cast-overflow jakub at gcc dot gnu.org 2014-12-12 16:11 ` [Bug sanitizer/64289] " jakub at gcc dot gnu.org 2014-12-12 16:19 ` jakub at gcc dot gnu.org @ 2014-12-17 9:27 ` jakub at gcc dot gnu.org 2015-04-22 12:01 ` jakub at gcc dot gnu.org 2015-07-16 9:19 ` rguenth at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: jakub at gcc dot gnu.org @ 2014-12-17 9:27 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64289 --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Dec 17 09:26:49 2014 New Revision: 218811 URL: https://gcc.gnu.org/viewcvs?rev=218811&root=gcc&view=rev Log: PR sanitizer/64289 * c-convert.c: Include ubsan.h. (convert): For real -> integral casts and -fsanitize=float-cast-overflow don't call convert_to_integer, but instead instrument the float cast directly. * c-c++-common/ubsan/pr64289.c: New test. Added: trunk/gcc/testsuite/c-c++-common/ubsan/pr64289.c Modified: trunk/gcc/c/ChangeLog trunk/gcc/c/c-convert.c trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug sanitizer/64289] ICE with -fsanitize=float-cast-overflow 2014-12-12 16:10 [Bug sanitizer/64289] New: ICE with -fsanitize=float-cast-overflow jakub at gcc dot gnu.org ` (2 preceding siblings ...) 2014-12-17 9:27 ` jakub at gcc dot gnu.org @ 2015-04-22 12:01 ` jakub at gcc dot gnu.org 2015-07-16 9:19 ` rguenth at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: jakub at gcc dot gnu.org @ 2015-04-22 12:01 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64289 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|5.0 |5.2 --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- GCC 5.1 has been released. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug sanitizer/64289] ICE with -fsanitize=float-cast-overflow 2014-12-12 16:10 [Bug sanitizer/64289] New: ICE with -fsanitize=float-cast-overflow jakub at gcc dot gnu.org ` (3 preceding siblings ...) 2015-04-22 12:01 ` jakub at gcc dot gnu.org @ 2015-07-16 9:19 ` rguenth at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-07-16 9:19 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64289 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|5.2 |5.3 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- GCC 5.2 is being released, adjusting target milestone to 5.3. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-07-16 9:19 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-12-12 16:10 [Bug sanitizer/64289] New: ICE with -fsanitize=float-cast-overflow jakub at gcc dot gnu.org 2014-12-12 16:11 ` [Bug sanitizer/64289] " jakub at gcc dot gnu.org 2014-12-12 16:19 ` jakub at gcc dot gnu.org 2014-12-17 9:27 ` jakub at gcc dot gnu.org 2015-04-22 12:01 ` jakub at gcc dot gnu.org 2015-07-16 9:19 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).