[Bug middle-end/41953] missing uninitialized warning (SRA,VOP)

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 25 13:41:31 GMT 2021


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2009-11-06 10:02:19         |2021-3-25

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Reconfirmed with -O2 -fno-tree-pre -fno-tree-sra or -O -fno-tree-sra. 
Basically the IL not warning is

int f (const struct ExtentsBase & e1, int n)
{
  struct ExtentsBase my_extents;
  int _1;
  int _7;

  <bb 2> [local count: 1073741824]:
  if (n_3(D) != 0)
    goto <bb 3>; [50.00%]
  else
    goto <bb 5>; [50.00%]

  <bb 5> [local count: 536870912]:
  goto <bb 4>; [100.00%]

  <bb 3> [local count: 536870913]:
  _1 = e1_5(D)->startx_;
  my_extents.startx_ = _1;

  <bb 4> [local count: 1073741824]:
  _7 = my_extents.startx_;
  my_extents ={v} {CLOBBER};
  return _7;

}

while we for example warn for (PRE enabled):

int f (const struct ExtentsBase & e1, int n)
{
  struct ExtentsBase my_extents;
  int _1;
  int pretmp_9;
  int prephitmp_10;

  <bb 2> [local count: 1073741824]:
  if (n_3(D) != 0)
    goto <bb 4>; [50.00%]
  else
    goto <bb 3>; [50.00%]

  <bb 3> [local count: 536870912]:
  pretmp_9 = my_extents.startx_;
  goto <bb 5>; [100.00%]

  <bb 4> [local count: 536870913]:
  _1 = e1_5(D)->startx_;

  <bb 5> [local count: 1073741824]:
  # prephitmp_10 = PHI <pretmp_9(3), _1(4)>
  my_extents ={v} {CLOBBER};
  return prephitmp_10;


More information about the Gcc-bugs mailing list