[llvm-bugs] [Bug 45233] New: Non-canonical loop nest not diagnosed

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 17 20:45:33 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45233

            Bug ID: 45233
           Summary: Non-canonical loop nest not diagnosed
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: OpenMP
          Assignee: unassignedclangbugs at nondot.org
          Reporter: llvm at meinersbur.de
                CC: llvm-bugs at lists.llvm.org

Consider the following program:

int main() {
#pragma omp for collapse(2)
  for (int i = 0; i < 128; i += 1)
    for (int j = 0; j < 128; j += i)
      ;

  return 0;
}


According to the OpenMP specification, the incr must be:

> An integer expression that is loop invariant with respect to the outermost
associated loop

However, clang consumes this loop without error diagnostic.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200318/af4038e1/attachment.html>


More information about the llvm-bugs mailing list