Bug 80511

Summary: [11/12/13/14 Regression] gcc.dg/Wstrict-overflow-18.c gcc.dg/Wstrict-overflow-7.c gcc.dg/pragma-diag-3.c
Product: gcc Reporter: Marc Glisse <glisse>
Component: tree-optimizationAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: david, dimhen, egallager, gabravier
Priority: P4 Keywords: diagnostic, xfail
Version: 8.0   
Target Milestone: 11.5   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2017-09-29 00:00:00

Description Marc Glisse 2017-04-24 21:16:53 UTC
I will soon commit a patch that breaks (and xfails) gcc.dg/Wstrict-overflow-18.c, see https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00986.html. As asked by Martin, this PR is here to track this regression.

Most likely this will be solved by Richard (or someone else) killing -Wstrict-overflow.
Comment 2 Eric Gallager 2017-09-29 00:30:30 UTC
(In reply to Marc Glisse from comment #0)
> I will soon commit a patch that breaks (and xfails)
> gcc.dg/Wstrict-overflow-18.c, see
> https://gcc.gnu.org/ml/gcc-patches/2017-04/msg00986.html. As asked by
> Martin, this PR is here to track this regression.
> 
> Most likely this will be solved by Richard (or someone else) killing
> -Wstrict-overflow.

Confirmed, although my preferred fix would be to keep and improve -Wstrict-overflow instead of killing it completely.
Comment 3 Marc Glisse 2017-10-14 20:14:33 UTC
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=253642

2 more testcases got xfailed: gcc.dg/Wstrict-overflow-7.c and gcc.dg/pragma-diag-3.c.

Some possibilities:
- add the warning in match.pd: users keep complaining about those strict-overflow warnings, so we would have to take it out of Wall.
- add the warning in match.pd, restricted to GENERIC: that gets us close to the gcc-7 situation.
- reimplement the warning in the front-end. In general, telling users that we simplified x+1<x to false is an optimization note, not a valid warning (it happens in perfectly fine code where we don't have any easy workaround). However, when the user literally writes x+1<x, that does deserve a warning. This would likely miss a lot of errors we currently notice, but that's unavoidable.
Comment 4 Jakub Jelinek 2018-05-02 10:05:08 UTC
GCC 8.1 has been released.
Comment 5 Jakub Jelinek 2018-07-26 11:01:56 UTC
GCC 8.2 has been released.
Comment 6 Jakub Jelinek 2019-02-22 15:20:57 UTC
GCC 8.3 has been released.
Comment 7 Jakub Jelinek 2020-03-04 09:41:22 UTC
GCC 8.4.0 has been released, adjusting target milestone.
Comment 8 Jakub Jelinek 2021-05-14 09:48:55 UTC
GCC 8 branch is being closed.
Comment 9 Richard Biener 2021-06-01 08:08:52 UTC
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
Comment 10 Andrew Pinski 2021-09-05 22:22:15 UTC
*** Bug 100702 has been marked as a duplicate of this bug. ***
Comment 11 Richard Biener 2022-05-27 09:37:14 UTC
GCC 9 branch is being closed
Comment 12 Jakub Jelinek 2022-06-28 10:33:15 UTC
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
Comment 13 Richard Biener 2023-07-07 10:32:13 UTC
GCC 10 branch is being closed.