[Bug target/15623] New: nop insertion does not look see restrict pointers

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon May 24 13:57:00 GMT 2004


Compile with -O2 -mcpu=power4 and see that both functions are the same but the second one should 
not have nops as we know that they are located at different places in memory as their declared as 
restrict:

int zero_restrict_pointers(int *p, int *q)
{
        *p = 0;
        return *q;
}
int two_restrict_pointers(int *restrict p, int *restrict q)
{
        *p = 0;
        return *q;
}

-- 
           Summary: nop insertion does not look see restrict pointers
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15623



More information about the Gcc-bugs mailing list