public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/105867] New: incorrect dangling-pointer warning
@ 2022-06-07  0:13 gman at chromium dot org
  2022-06-07  6:05 ` [Bug tree-optimization/105867] [12/13 Regression] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gman at chromium dot org @ 2022-06-07  0:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105867

            Bug ID: 105867
           Summary: incorrect dangling-pointer warning
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gman at chromium dot org
  Target Milestone: ---

Created attachment 53094
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53094&action=edit
dangling-pointer warning repo

This code (attached) could be doing something wrong but I was asked to look
into why this code gets an dangling-pointer warning in gcc 12.1 and after
looking though it it seems like maybe the code is fine and the warning is
incorrect?

compiled with 

-std=c++17 -Wall -Wextra -pedantic-errors -Wdangling-pointer -O2

note that there is a function, TIntermRebuild::printStack, which is called in
several places. It's inclusion doesn't seem like it should affect the warning.
As it is it is compiled out via a macro

    #define printStack(msg)

compiling it back in (delete the line above) makes the warning go away.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-08 12:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07  0:13 [Bug middle-end/105867] New: incorrect dangling-pointer warning gman at chromium dot org
2022-06-07  6:05 ` [Bug tree-optimization/105867] [12/13 Regression] " pinskia at gcc dot gnu.org
2022-07-25 16:10 ` rguenth at gcc dot gnu.org
2022-11-13  9:32 ` agriff at tin dot it
2023-03-20 10:48 ` wielkiegie at gmail dot com
2023-05-08 12:24 ` [Bug tree-optimization/105867] [12/13/14 " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).