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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The warning comes from:
  <bb 24> [local count: 64057779]:
  util_format_unswizzle_4f (&border_swizzled, _42, 64B);
  goto <bb 38>; [100.00%]


Jump threading and having util_format_description declared as const causes a
null pointer for desc to prograted into the argument of that function.

Some places check the return value of util_format_description to see if it was
non-null whiles others do not. I am not sure if we can assert the return value
of util_format_description is non-null in r300_get_border_color but that
removes the warning.

That is:
static uint32_t r300_get_border_color(enum pipe_format format,
                                      const float border[4],
                                      boolean is_r500)
{
    const struct util_format_description *desc;
    float border_swizzled[4] = {0};
    union util_color uc = {0};

    desc = util_format_description(format);
    if (desc == 0)  __builtin_unreachable();

Reply via email to