[Bug tree-optimization/106155] [12/13/14 Regression] spurious "may be used uninitialized" warning

2023-06-12 Thread vincent-gcc at vinc17 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106155

--- Comment #12 from Vincent Lefèvre  ---
Here's a similar, simpler testcase:

int f1 (void);
void f2 (int);
long f3 (long);

void tst (void)
{
  int badDataSize[3] = { 1, 1, 1 };

  for (int i = 0; i < 3; i++)
{
  int emax;
  if (i == 2)
emax = f1 ();
  int status = f3 (badDataSize[i]);
  if (f1 ())
f1 ();
  if (status)
f1 ();
  if (i == 2)
f2 (emax);
}
}

gcc-12 (Debian 12.2.0-14) 12.2.0 warns at -O1, but not at -O2.
gcc-13 (Debian 13.1.0-5) 13.1.0 is worse, as it warns at both -O1 and -O2.

[Bug tree-optimization/106155] [12/13/14 Regression] spurious "may be used uninitialized" warning

2023-05-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106155

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|12.3|12.4

--- Comment #11 from Richard Biener  ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.