[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-24 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-24 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 --- Comment #10 from Jason Merrill --- Author: jason Date: Thu Mar 24 17:59:58 2016 New Revision: 234463 URL: https://gcc.gnu.org/viewcvs?rev=234463=gcc=rev Log: PR c++/70323 * constexpr.c (cxx_eval_call_expression): Don't

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-24 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 Jason Merrill changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 --- Comment #9 from Jakub Jelinek --- One part fixed, the -Wall part still broken.

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 --- Comment #8 from Jakub Jelinek --- Author: jakub Date: Wed Mar 23 18:45:26 2016 New Revision: 234438 URL: https://gcc.gnu.org/viewcvs?rev=234438=gcc=rev Log: PR c++/70323 * constexpr.c (cxx_eval_constant_expression): Diagnose

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 Richard Biener changed: What|Removed |Added Priority|P3 |P1

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 --- Comment #7 from Jakub Jelinek --- (In reply to Martin Sebor from comment #6) > I see the problem: It's -Wall that suppresses the error. Yeah, seems with -Wall ctx->quiet is true (probably desirable, for some kind of warning we don't want to

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-22 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 --- Comment #6 from Martin Sebor --- I see the problem: It's -Wall that suppresses the error.

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-22 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 --- Comment #5 from Martin Sebor --- (In reply to Jakub Jelinek from comment #3) > Created attachment 38054 [details] Hmm. Something else must be going on. I've applied your patch on powerpc64le but it hasn't changed anything.

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-22 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 --- Comment #4 from Martin Sebor --- That's odd. I do have local changes in my tree but I verified it on three other machines. I've retested with today's pristine top of trunk on powerpc64le, still with no errors.

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 --- Comment #3 from Jakub Jelinek --- Created attachment 38054 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38054=edit gcc6-pr70323.patch This seems like it would work, but haven't bootstrapped/regtested it yet.

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 --- Comment #2 from Jakub Jelinek --- As for the missing first error, the function is cp_folded into return = i == 0 ? -2147483648(OVF) : 2147483647; Thus, I wonder if VERIFY_CONSTANT or something similar shouldn't be done either in

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 --- Comment #1 from Jakub Jelinek --- I'm still getting the second error even with latest trunk, so can only partially reproduce it: pr70323.C:7:37: in constexpr expansion of ‘overflow_if_1(1)’ pr70323.C:7:39: error: overflow in constant

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c++/70323] [6 regression] missing error on integer overflow in constexpr function result converted to bool

2016-03-20 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70323 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |6.0