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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Thiago Macieira from comment #2)
> GCC doesn't print anything and doesn't take the assumption into account, but
> Clang prints:
> 
> warning: assumption is ignored because it contains (potential) side-effects
> [-Wassume]
>     8 |   [[assume(!r || *r > 0)]];
>       |   ~~~~~~~~~^~~~~~~~~~~~~~~

I do think this could be done to:
[[assume(!r)]];
[[assume(*r > 0)]];
So at least part of the assume could be useful and then maybe ipa sra/cp could
do something.

Reply via email to