[llvm-bugs] [Bug 28340] New: Local class + function pointer template argument + noexcept = SEGFAULT

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 28 00:44:57 PDT 2016


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

            Bug ID: 28340
           Summary: Local class + function pointer template argument +
                    noexcept = SEGFAULT
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: turck11 at hotmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16646
  --> https://llvm.org/bugs/attachment.cgi?id=16646&action=edit
Run script. Couldn't figure out how to add a 2nd attachment, but the
preprocessed output is boring/probably not helpful anyway.

Minimal repro:

template<typename T>
void isNothrowCallableFunPtr() {
  struct NothrowCallableTest {
    T fun;
    NothrowCallableTest() noexcept(noexcept(fun())) {}
  };
}

int main() {
  isNothrowCallableFunPtr<void(*)()>();
  return 0;
}

See it live on the trunk version of clang here, including the output:
http://melpon.org/wandbox/permlink/dZw6IKrnMY1VbKM8

This repros on 3.8, 3.7, 3.6... maybe more. Also on Apple LLVM version 7.3.0
(clang-703.0.31), which is what I attached the preprocessed source and
associated run script from.

-- 
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/20160628/c7e8606d/attachment-0001.html>


More information about the llvm-bugs mailing list