[LLVMbugs] [Bug 15597] New: noexcept(true) does not compile with default functions (ctor, dtor) of a templated class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 26 06:44:20 PDT 2013


            Bug ID: 15597
           Summary: noexcept(true) does not compile with default functions
                    (ctor, dtor) of a templated class
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kutlak.roman at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10242
  --> http://llvm.org/bugs/attachment.cgi?id=10242&action=edit
preprocessed source and associated run script

I have a simple templated class that does compile with `noexcept` but not with

template<typename T>
struct Foo
  Foo() noexcept = default;
  ~Foo() noexcept(true) = default;

int main(int argc, char** argv)
  Foo<int> f;
  return 0;

The error I get from clang is:
Stack dump:
0.    Program arguments:
/Users/roman/Developer/llvm_build/Release+Asserts/bin/clang -cc1 -triple
x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -main-file-name
noexcept.cpp -mrelocation-model pic -pic-level 2 -mdisable-fp-elim
-masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 134.9
/Users/roman/Developer/llvm_build/Release+Asserts/bin/../lib/clang/3.3 -I
/Developer/libcxx_build/include/ -I /Developer/boost_build/include -I
/opt/local/include -stdlib=libc++ -Wall -Wunknown-pragmas -pedantic -std=c++11
-fdeprecated-macro -fdebug-compilation-dir /Users/roman/tmp -ferror-limit 19
-fmessage-length 347 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.8.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fencode-extended-block-signature
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-backend-option -vectorize-loops -o
/var/folders/cp/mnxl6mfx73l5yvfxqs1nhxm00000gp/T/noexcept-FMmIH9.o -x c++
1.    noexcept.cpp:10:13: current parser token ';'
2.    noexcept.cpp:9:1: parsing function body 'main'
3.    noexcept.cpp:9:1: in compound statement ('{}')
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
clang version 3.3 (trunk 177870:177998) (llvm/trunk 177998)
Target: x86_64-apple-darwin12.3.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: 

The diagnostic files are attached.

Roman Kutlak

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/20130326/e30eabb7/attachment.html>

More information about the llvm-bugs mailing list