[Bug middle-end/104232] [12 Regression] spurious -Wuse-after-free after conditional free

2022-01-31 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104232

Martin Sebor  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #6 from Martin Sebor  ---
Fixed in r12-6947.

[Bug middle-end/104232] [12 Regression] spurious -Wuse-after-free after conditional free

2022-01-31 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104232

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Martin Sebor :

https://gcc.gnu.org/g:48d3191e7bd6245bd2df625731f1ad9207a26655

commit r12-6947-g48d3191e7bd6245bd2df625731f1ad9207a26655
Author: Martin Sebor 
Date:   Mon Jan 31 12:04:55 2022 -0700

Constrain PHI handling in -Wuse-after-free [PR104232].

Resolves:
PR middle-end/104232 - spurious -Wuse-after-free after conditional free

gcc/ChangeLog:

PR middle-end/104232
* gimple-ssa-warn-access.cc (pointers_related_p): Add argument.
Handle PHIs.  Add a synonymous overload.
(pass_waccess::check_pointer_uses): Call pointers_related_p.

gcc/testsuite/ChangeLog:

PR middle-end/104232
* g++.dg/warn/Wuse-after-free4.C: New test.
* gcc.dg/Wuse-after-free-2.c: New test.
* gcc.dg/Wuse-after-free-3.c: New test.

[Bug middle-end/104232] [12 Regression] spurious -Wuse-after-free after conditional free

2022-01-31 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104232

--- Comment #4 from Martin Sebor  ---
The full link to the patch:
https://gcc.gnu.org/pipermail/gcc-patches/2022-January/589366.html

[Bug middle-end/104232] [12 Regression] spurious -Wuse-after-free after conditional free

2022-01-31 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104232

--- Comment #3 from Martin Sebor  ---
*** Bug 104269 has been marked as a duplicate of this bug. ***

[Bug middle-end/104232] [12 Regression] spurious -Wuse-after-free after conditional free

2022-01-31 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104232

Martin Sebor  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #2 from Martin Sebor  ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2022-January/

[Bug middle-end/104232] [12 Regression] spurious -Wuse-after-free after conditional free

2022-01-25 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104232

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |12.0
   Priority|P3  |P1

[Bug middle-end/104232] [12 Regression] spurious -Wuse-after-free after conditional free

2022-01-25 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104232

Martin Sebor  changed:

   What|Removed |Added

URL|https://bugzilla.redhat.com |https://bugzilla.redhat.com
   |/show_bug.cgi?id=2043195|/show_bug.cgi?id=2043915

--- Comment #1 from Martin Sebor  ---
The correct URL is https://bugzilla.redhat.com/show_bug.cgi?id=2043915

[Bug middle-end/104232] [12 Regression] spurious -Wuse-after-free after conditional free

2022-01-25 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104232

Martin Sebor  changed:

   What|Removed |Added

 Blocks||104075
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
 Ever confirmed|0   |1
 Status|UNCONFIRMED |ASSIGNED
   Keywords||diagnostic
   Last reconfirmed||2022-01-25
URL||https://bugzilla.redhat.com
   ||/show_bug.cgi?id=2043195
Summary|spurious -Wuse-after-free   |[12 Regression] spurious
   |after conditional free  |-Wuse-after-free after
   ||conditional free


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104075
[Bug 104075] bogus/missing -Wuse-after-free