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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Nikita Kniazev from comment #6)
> The duplication happens even if I make cond int and compare with any other
> value
> 
> void use(int *);
> void use2(int *);
> 
> void foo(int * p, int cond)
> {
>     if (cond == 789) {
>         use(p);
>     }
>     use2(p);
> }

Yes and no, Yes it does in GCC 7/8 but starting in GCC 9 there is not.
GCC before GCC 10.x is no longer supported so there is not much we can do
there.

Reply via email to