Bug 80511 - [8/9/10/11/12 Regression] gcc.dg/Wstrict-overflow-18.c gcc.dg/Wstrict-overflow-7.c gcc.dg/pragma-diag-3.c
Summary: [8/9/10/11/12 Regression] gcc.dg/Wstrict-overflow-18.c gcc.dg/Wstrict-overflo...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 8.0
: P4 normal
Target Milestone: 8.5
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic, xfail
Depends on:
Blocks:
 
Reported: 2017-04-24 21:16 UTC by Marc Glisse
Modified: 2020-11-09 01:58 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2017-09-29 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.