https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116090
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |15.0
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> Created attachment 58757 [details]
> Slightly reduced
>
> if we change opt_c to be bool rather than `unsigned char`, there is no
> warning. I have not looked into why.
>
> Note SRA uses `unsigned char` here for bool fields and that seemly is the
> issue.
Note the change to bool still fails I don't know why I misrepresented it that
way.
Also note I do think there is a missing check inside the loop for the use of
*opt .
But it does not change the warning. That is change it to be:
if (Condition() && opt)
*opt += 1;
else
...
Anyways dump from uninit1:
After normalization [USE]:
UseValue (opt_19);
is conditional on:
((_24 != 0) AND (n_11 != 0) AND (NOT (_9 != _16)))
After normalization [DEF]:
opt_19 = PHI <_1(4), opt_33(6), opt_15(D)(14)>
is conditional on:
((_13 != 0))
OR ((NOT (opt$4_36 != 0)))
_24 = (bool) opt$4_14;
# opt$4_14 = PHI <opt$4_36(4), 0(6), 0(14)>
# opt_19 = PHI <_1(4), opt_33(6), opt_15(D)(14)>
Looks like it is not looking through cast.
This is almost positive a dup too.