[LLVMbugs] [Bug 18252] New: clang crashes when compiling recursive variadic template expression

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Dec 14 09:39:03 PST 2013


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

            Bug ID: 18252
           Summary: clang crashes when compiling recursive variadic
                    template expression
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: oakad at yahoo.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The program in question tests a particular case of variadic implementation of
boost::mpl::bind metafunction. gcc will compile the program successfully,
producing the following output (the typeid().name() of the offending type):

m1.1:
ucpf::yesod::mpl::protect<ucpf::yesod::mpl::bind<ucpf::yesod::mpl::quote<ucpf::yesod::mpl::plus,
ucpf::yesod::mpl::void_>, ucpf::yesod::mpl::arg<0l, 0l>,
ucpf::yesod::mpl::arg<1l, 0l> > >

Unfortunately, it is rather difficult to minimize the test case, as even small
modifications to the source either make compilation fail (with reasonable
errors) or compile but result in incorrect behavior. gcc appears to handle the
code in question just fine.

Command line:
/usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all
-disable-f
ree -disable-llvm-verifier -main-file-name apply3.cpp -mrelocation-model static
-mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tabl
es -fuse-init-array -target-cpu x86-64 -target-linker-version
2.23.52.0.2.201304
23 -std=c++11 -fdeprecated-macro -ferror-limit 19 -fmessage-length 80
-mstackrea
lign -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fcxx-exceptions
-f
exceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option
-vector
ize-loops -x c++ apply3-ii1vni.cpp

-- 
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/20131214/e873233a/attachment.html>


More information about the llvm-bugs mailing list