public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/99959] New: missing -Wuninitialized for an esra variable with TREE_NO_WARNING
@ 2021-04-07 14:58 msebor at gcc dot gnu.org
  2021-04-07 15:10 ` [Bug middle-end/99959] [9/10/11 Regression] " msebor at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-04-07 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99959
           Summary: missing -Wuninitialized for an esra variable with
                    TREE_NO_WARNING
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

GCC fails to issue -Wuninitialized for the following test case derived from
pr99945.  The warning detects the uninitialized use but the SR.3 variable has
the TREE_NO_WARNING bit set which suppresses it.

$ cat z.c && gcc -O2 -S -Wall -fdump-tree-esra=/dev/stdout z.c
void g (void)
{
  int i;

  void f (int *t)
  {
    __builtin_printf ("%i", i);   // missing -Wuninitialized
  }

  int t __attribute__ ((cleanup (f))) = 0;
}


;; Function f (f.0, funcdef_no=1, decl_uid=1947, cgraph_uid=1, symbol_order=0)

void f (int * t)
{
  int _3;

  <bb 2> :
  _3 = CHAIN.1_2(D)->i;
  __builtin_printf ("%i", _3);
  return;

}



;; Function g (g, funcdef_no=0, decl_uid=1943, cgraph_uid=2, symbol_order=1)

Created a replacement for FRAME.0 offset: 0, size: 32: SR.3D.1962
void g ()
{
  int SR.3;
  struct FRAME.g FRAME.0;
  int t;
  void * _3;
  int _8;

  <bb 2> :
  _3 = __builtin_dwarf_cfa (0);
  FRAME.0.FRAME_BASE.PARENT = _3;
  _8 = SR.3_10(D);
  __builtin_printf ("%i", _8);
  return;

}

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

end of thread, other threads:[~2023-07-07 10:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 14:58 [Bug middle-end/99959] New: missing -Wuninitialized for an esra variable with TREE_NO_WARNING msebor at gcc dot gnu.org
2021-04-07 15:10 ` [Bug middle-end/99959] [9/10/11 Regression] " msebor at gcc dot gnu.org
2021-04-08  7:07 ` rguenth at gcc dot gnu.org
2021-04-08 14:23 ` rguenth at gcc dot gnu.org
2021-06-01  8:20 ` [Bug middle-end/99959] [9/10/11/12 " rguenth at gcc dot gnu.org
2021-06-26 15:16 ` egallager at gcc dot gnu.org
2021-06-28 20:08 ` msebor at gcc dot gnu.org
2022-05-27  9:44 ` [Bug middle-end/99959] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:44 ` jakub at gcc dot gnu.org
2023-07-07 10:39 ` [Bug middle-end/99959] [11/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).