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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #9)
> The testcases from comment #6 and comment #7 are now (gcc-8) properly
> optimized. The original has lost one of the 2 calls to free, one remains:
> 
>  __old_val_4 = MEM[(void * &)a_2(D)];
>   MEM[(void * &)a_2(D)] = 0B;
>   __old_val_5 = MEM[(void * &)b_3(D)];
>   MEM[(void * &)b_3(D)] = 0B;
>   MEM[(void * &)a_2(D)] = __old_val_5;
>   _6 = MEM[(void * &)b_3(D)];
>   MEM[(void * &)b_3(D)] = __old_val_4;
>   if (_6 != 0B)
> 
> (whether a is the same as b or disjoint, _6 is always 0, but that's not easy
> to see)

Do to the above analysis, there is another bug which this is a dup of but I
can't find it right now.

Reply via email to