http://llvm.org/bugs/show_bug.cgi?id=11354

             Bug #: 11354
           Summary: restrict keyword not turned into noalias if array
                    syntax is used
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


C99 states the following:

------------------------------------------------------------------
6.7.5.3 Function declarators (including prototypes)

[...]
21 EXAMPLE 5  The following are all compatible function prototype declarators.
[..]

as are:

void f1(double (* restrict a)[5]) {}
void f2(double a[restrict][5]) {}
void f3(double a[restrict 3][5]) {}
[...]
------------------------------------------------------------------

We generate the noalias attribute only for f1, but not for f2 and f3:

define void @f1([5 x double]* noalias nocapture %a) {
  ret void
}

define void @f2([5 x double]* nocapture %a) {
  ret void
}

define void @f3([5 x double]* nocapture %a) {
  ret void
}

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to