Re: [PATCH] call mark_dfs_back_edges() before testing EDGE_DFS_BACK [PR104761]

2022-03-10 Thread Jason Merrill via Gcc-patches
On 3/2/22 19:15, Martin Sebor wrote: The -Wdangling-pointer code tests the EDGE_DFS_BACK but the pass never calls the mark_dfs_back_edges() function that initializes the bit (I didn't know about it).  As a result the bit is not set when expected, which can cause false positives under the right co

Re: [PATCH] call mark_dfs_back_edges() before testing EDGE_DFS_BACK [PR104761]

2022-03-04 Thread Jakub Jelinek via Gcc-patches
On Thu, Mar 03, 2022 at 05:08:30PM -0700, Martin Sebor wrote: > > 1) shouldn't it give up for EDGE_ABNORMAL too? I mean, e.g. > > following a non-local goto forced edge from a noreturn call > > to a non-local label (if there is just one) doesn't seem > > right to me > > Possibly yes.

Re: [PATCH] call mark_dfs_back_edges() before testing EDGE_DFS_BACK [PR104761]

2022-03-03 Thread Martin Sebor via Gcc-patches
On 3/3/22 01:01, Jakub Jelinek wrote: On Wed, Mar 02, 2022 at 04:15:09PM -0700, Martin Sebor via Gcc-patches wrote: The -Wdangling-pointer code tests the EDGE_DFS_BACK but the pass never calls the mark_dfs_back_edges() function that initializes the bit (I didn't know about it). As a result the

Re: [PATCH] call mark_dfs_back_edges() before testing EDGE_DFS_BACK [PR104761]

2022-03-03 Thread Jeff Law via Gcc-patches
On 3/3/2022 1:01 AM, Jakub Jelinek wrote: On Wed, Mar 02, 2022 at 04:15:09PM -0700, Martin Sebor via Gcc-patches wrote: The -Wdangling-pointer code tests the EDGE_DFS_BACK but the pass never calls the mark_dfs_back_edges() function that initializes the bit (I didn't know about it). As a resu

Re: [PATCH] call mark_dfs_back_edges() before testing EDGE_DFS_BACK [PR104761]

2022-03-03 Thread Richard Biener via Gcc-patches
> Am 03.03.2022 um 09:02 schrieb Jakub Jelinek via Gcc-patches > : > > On Wed, Mar 02, 2022 at 04:15:09PM -0700, Martin Sebor via Gcc-patches wrote: >> The -Wdangling-pointer code tests the EDGE_DFS_BACK but the pass never >> calls the mark_dfs_back_edges() function that initializes the bit (

Re: [PATCH] call mark_dfs_back_edges() before testing EDGE_DFS_BACK [PR104761]

2022-03-03 Thread Jakub Jelinek via Gcc-patches
On Wed, Mar 02, 2022 at 04:15:09PM -0700, Martin Sebor via Gcc-patches wrote: > The -Wdangling-pointer code tests the EDGE_DFS_BACK but the pass never > calls the mark_dfs_back_edges() function that initializes the bit (I > didn't know about it). As a result the bit is not set when expected, > whi

[PATCH] call mark_dfs_back_edges() before testing EDGE_DFS_BACK [PR104761]

2022-03-02 Thread Martin Sebor via Gcc-patches
The -Wdangling-pointer code tests the EDGE_DFS_BACK but the pass never calls the mark_dfs_back_edges() function that initializes the bit (I didn't know about it). As a result the bit is not set when expected, which can cause false positives under the right conditions. The attached patch adds a c