[llvm-bugs] [Bug 50158] New: Crash with `#pragma GCC unroll` when calling value which can't be called in template function

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 28 17:54:08 PDT 2021


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

            Bug ID: 50158
           Summary: Crash with `#pragma GCC unroll` when calling value
                    which can't be called in template function
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ryan_greenblatt at brown.edu
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

```
template<typename T> void f(T v) {
    #pragma GCC unroll v()
    for (;;) {
    }
} 

int main() {
  f(0);
}
```
https://godbolt.org/z/8bEscGszK

Amusingly, this gets gcc and clang.

-- 
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/20210429/c82c712b/attachment-0001.html>


More information about the llvm-bugs mailing list