https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128916
--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #1)
> Confirmed. The bug is in lowering/outlining of the assume function.
>
>
> Before we had:
> ```
>
> [[assume (D.3482)]]
> {
> {
> bool iftmp.0;
>
> if (c > 5) goto <D.3484>; else goto <D.3487>;
> <D.3487>:
> if (q == &x) goto <D.3484>; else goto <D.3485>;
> <D.3484>:
> iftmp.0 = 1;
> goto <D.3486>;
> <D.3485>:
> iftmp.0 = 0;
> <D.3486>:
> D.3482 = iftmp.0;
> }
> }
> ```
>
>
> But the lowering does not change it into take by reference for x.
__attribute__((noipa, noinline, noclone, no_icf))
bool f._assume.0 (int c, int * q, int x)
{
bool iftmp.0;
bool D.3495;
D.3495 = 0;
if (c > 5) goto <D.3484>; else goto <D.3487>;
<D.3487>:
if (q == &x) goto <D.3484>; else goto <D.3485>;
<D.3484>:
iftmp.0 = 1;
goto <D.3486>;
<D.3485>:
iftmp.0 = 0;
<D.3486>:
D.3495 = iftmp.0;
goto <D.3501>;
<D.3501>:
return D.3495;
}