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

            Bug ID: 47699
           Summary: Assertion `!isa<ConstantExpr>(E)' failed
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++17
          Assignee: unassignedclangb...@nondot.org
          Reporter: picke...@synopsys.com
                CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
                    llvm-bugs@lists.llvm.org, richard-l...@metafoo.co.uk

Created attachment 24012
  --> https://bugs.llvm.org/attachment.cgi?id=24012&action=edit
Test case

clang crashes when the attached file is compiled in c++17 mode:

clang -std=c++17 CrashTest.cpp


clang-10: .../working/llvm-project/clang/lib/AST/Expr.cpp:285: static
clang::ConstantExpr* clang::ConstantExpr::Create(const clang::ASTContext&,
clang::Expr*, clang::ConstantExpr::ResultStorageKind): Assertion
`!isa<ConstantExpr>(E)' failed.
Stack dump:
0.      Program arguments: .../working/llvm-project/BUILD/bin/clang-10 -cc1
-triple x86_64 -emit-obj -mrelax-all -disable-free -main-file-name
CrashTest.cpp -mrelocation-model static -mthread-model posix
-mframe-pointer=all -fmath-errno -fno-rounding-math -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -dwarf-column-info
-fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir
.../working/llvm-project/BUILD/lib/clang/10.0.1 -std=c++17 -fdeprecated-macro
-fdebug-compilation-dir ... -ferror-limit 19 -fmessage-length 0
-fgnuc-version=4.2.1 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -faddrsig -o
/tmp/CrashTest-053b7b.o -x c++ CrashTest.cpp 
1.      CrashTest.cpp:2775:47: current parser token ';'
2.      CrashTest.cpp:2772:12: parsing function body 'main'
3.      CrashTest.cpp:2772:12: in compound statement ('{}')
4.      CrashTest.cpp:1666:7: instantiating class definition
'boost::ext::sml::v1_1_3::back::sm<boost::ext::sml::v1_1_3::back::sm_policy<SmDefinition<AnyStruct>>
>'
5.      CrashTest.cpp:2764:10: instantiating function definition
'SmDefinition<AnyStruct>::operator()'

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to