This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/61409] [5/6/7 regression] -Wmaybe-uninitialized false-positive with -O2


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

--- Comment #20 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
If anyone is interested, here is an even smaller testcase:

int *rw;
int line_height;
int pixel_width;
int text_cols;
int width1, width2, width3;

void *pointer;

void f (int i, int j)
{
  void *ptr;
  if (i)
    {
      if (j)
        return;
      ptr = pointer;
    }
  pixel_width = 1234 + width1 + 2 * width2 + 2 * width3;
  *rw = text_cols + line_height;
  if (i)
    rw=ptr;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]