This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/48390] Multiple setting to restricted pointer variable not optimized away


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

vries at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vries at gcc dot gnu.org

--- Comment #2 from vries at gcc dot gnu.org ---
(In reply to Tobias Burnus from comment #0)
> float
> foo (float * restrict a, float * restrict b, float * restrict c, float *ptr)
> {
>  *a = 1; /* Can delete.  */
>  *b = *ptr + 2;
>  *a = 3;
> 
>  return *a + *b;
> }
> 

This is supported in current trunk, and the dead store '*a = 1' is removed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]