[llvm-bugs] [Bug 37544] Add llvm.experimental.constrained.* conversion intrinsics
https://bugs.llvm.org/show_bug.cgi?id=37544 Simon Pilgrim changed: What|Removed |Added Fixed By Commit(s)||rGddf13c00edf1, ||rG5987749e33bb Component|new bugs|Common Code Generator Code Status|NEW |RESOLVED Version|unspecified |trunk Resolution|--- |FIXED Product|new-bugs|libraries CC||andrew.kay...@intel.com, ||craig.top...@gmail.com, ||kevin.n...@sas.com --- Comment #1 from Simon Pilgrim --- These were added some time ago [FPEnv] Add fptosi and fptoui constrained intrinsics. rGddf13c00edf1 Add constrained fptrunc and fpext intrinsics. rG5987749e33bb -- 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
[llvm-bugs] [Bug 38970] [X86][AVX] Improve vXi64 to vXf32 ISD::UINT_TO_FP lowering
https://bugs.llvm.org/show_bug.cgi?id=38970 Simon Pilgrim changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #2 from Simon Pilgrim --- Craig's series of patches (including D71956/rG95840866b7d8) handles this on SSE41+ targets. -- 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
[llvm-bugs] [Bug 44754] New: [InstCombine] ashr+and+icmp not simplified
https://bugs.llvm.org/show_bug.cgi?id=44754 Bug ID: 44754 Summary: [InstCombine] ashr+and+icmp not simplified Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: Scalar Optimizations Assignee: unassignedb...@nondot.org Reporter: nikita@gmail.com CC: llvm-bugs@lists.llvm.org define i1 @foo(i32 %a) { %ashr = ashr i32 %a, 5 %and = and i32 %ashr, -2 %cmp = icmp slt i32 %and, 1 ret i1 %cmp } is not simplified to define i1 @foo(i32 %a) { %and2 = and i32 %a, -64 %cmp = icmp slt i32 %and2, 32 ret i1 %cmp } but could be (https://rise4fun.com/Alive/FkZq). Encountered this as fallout from a worklist order change in test/Transforms/InstCombine/pr17827.ll. -- 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
[llvm-bugs] [Bug 42659] x86 FeatureAVX2 ought to imply FeatureFMA
https://bugs.llvm.org/show_bug.cgi?id=42659 Simon Pilgrim changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #2 from Simon Pilgrim --- AVX2 doesn't imply FMA ISA support and there are chips out there that don't have both. -- 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
[llvm-bugs] [Bug 43938] [X86] implicit-null-checks.mir and copy-eflags.ll failing with EXPENSIVE_CHECKS builds
https://bugs.llvm.org/show_bug.cgi?id=43938 Simon Pilgrim changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Fixed By Commit(s)||rGee57469a5128,rG659efa21f1 ||b3 --- Comment #4 from Simon Pilgrim --- The X86 issue was fixed by rGee57469a5128 And D68267/rGb7b170c9b46a was recommitted at rG659efa21f1b3 -- 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
[llvm-bugs] [Bug 32325] [META][X86] Improve implementation and use of X86 scheduler models
https://bugs.llvm.org/show_bug.cgi?id=32325 Bug 32325 depends on bug 36908, which changed state. Bug 36908 Summary: [meta][x86] Improve scheduler classes instruction coverage https://bugs.llvm.org/show_bug.cgi?id=36908 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED -- 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
[llvm-bugs] [Bug 36908] [meta][x86] Improve scheduler classes instruction coverage
https://bugs.llvm.org/show_bug.cgi?id=36908 Simon Pilgrim changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Simon Pilgrim --- Resolving - we've done a lot of cleanup of the x86 schedule classes over the past 2 years, and SubtargetEmitter/CodeGenSchedModels warns for inefficient use of regex etc. -- 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
[llvm-bugs] [Bug 31224] lld produces broken executable with CUDA
https://bugs.llvm.org/show_bug.cgi?id=31224 Fangrui Song changed: What|Removed |Added CC||i...@maskray.me Resolution|--- |WONTFIX Status|REOPENED|RESOLVED --- Comment #28 from Fangrui Song --- Looks like a wontfix. FWIW https://reviews.llvm.org/D71434 I changed clang to not use .ctors/.dtors on generic ELF platforms. -- 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
[llvm-bugs] [Bug 44755] New: Assertion `getValueKind() == VK_RValue' failed.
https://bugs.llvm.org/show_bug.cgi?id=44755 Bug ID: 44755 Summary: Assertion `getValueKind() == VK_RValue' failed. Product: clang Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: changoch...@gmail.com CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org, neeil...@live.com, richard-l...@metafoo.co.uk POC: --- # 1 "" # 1 "test1.c" ()( void a , union {: &a --- Run script: --- # Crash reproducer for clang version 11.0.0 (https://github.com/llvm/llvm-project.git 56b7f595d2b402ff177ca42214325c8fdea10fb0) # Driver args: "-x" "c" "-o" "/dev/null" "test1.c" # Original command: "/home/rxz226/llvm-project/bld_instru/bin/clang-11" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" "-main-file-name" "test1.c" "-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" "/home/rxz226/llvm-project/bld_instru/lib/clang/11.0.0" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/home/rxz226/llvm-project/bld_instru/lib/clang/11.0.0/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir" "/home/rxz226/fuzzing/2020-02-02/clang/hangs/test" "-ferror-limit" "19" "-fmessage-length" "0" "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-faddrsig" "-o" "/tmp/test1-6ea1ac.o" "-x" "c" "test1.c" "/home/rxz226/llvm-project/bld_instru/bin/clang-11" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" "-main-file-name" "test1.c" "-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" "-ferror-limit" "19" "-fmessage-length" "0" "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-faddrsig" "-x" "c" "test1-2c526b.c" --- Stack dump: --- clang: /home/rxz226/llvm-project/clang/lib/AST/ExprClassification.cpp:67: Cl clang::Expr::ClassifyImpl(clang::ASTContext &, clang::SourceLocation *) const: Assertion `getValueKind() == VK_RValue' failed. Stack dump: 0. Program arguments: /home/rxz226/llvm-project/bld_instru/bin/clang -x c -o /dev/null test1.c 1. parser at end of file 2. test1.c:1:14: parsing struct/union body '(anonymous)' #0 0x0681faf6 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:560:7 #1 0x0681ac5e llvm::sys::RunSignalHandlers() /home/rxz226/llvm-project/llvm/lib/Support/Signals.cpp:69:18 #2 0x0681dd30 llvm::sys::CleanupOnSignal(unsigned long) /home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:361:3 #3 0x0662a5aa (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:80:5 #4 0x0662a9e6 /home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:361:51 #5 0x7f02c92a7390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390) #6 0x7f02c7e11428 raise /build/glibc-LK5gWL/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0 #7 0x7f02c7e1302a abort /build/glibc-LK5gWL/glibc-2.23/stdlib/abort.c:91:0 #8 0x7f02c7e09bd7 __assert_fail_base /build/glibc-LK5gWL/glibc-2.23/assert/assert.c:92:0 #9 0x7f02c7e09c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82) #10 0x0e542f0e llvm::cast_retty::ret_type llvm::cast(clang::Expr const*) /home/rxz226/llvm-project/llvm/include/llvm/Support/Casting.h:264:3 #11 0x0e542f0e llvm::cast_retty::ret_type llvm::dyn_cast(clang::Expr const*) /home/rxz226/llvm-project/llvm/include/llvm/Support/Casting.h:343:0 #12 0x0e542f0e IsModifiable(clang::ASTContext&, clang::Expr const*, clang::Expr::Classification::Kinds, clang::SourceLocation&) /home/rxz226/llvm-project/clang/lib/AST/ExprClassification.cpp:630:0 #13 0x0e542f0e clang::Expr::ClassifyImpl(clang::ASTContext&, clang::SourceLocation*) const /home/rxz226/llvm-project/clang/lib/AST/ExprClassification.cpp:72:0 #14 0x0e5474dd clang::Expr::Classification::getKind() const /home/rxz226/llvm-project/clang/include/clang/AST/Expr.h:0:0 ... --- -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.o
[llvm-bugs] [Bug 44756] New: Crash on release version. Assertion `Arg < getNumArgs() && "Arg access out of range!"
https://bugs.llvm.org/show_bug.cgi?id=44756 Bug ID: 44756 Summary: Crash on release version. Assertion `Arg < getNumArgs() && "Arg access out of range!" Product: clang Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: changoch...@gmail.com CC: llvm-bugs@lists.llvm.org, neeil...@live.com, richard-l...@metafoo.co.uk POC: --- # 1 "" # 1 "test1.c" a() { int strlen(; strlen() - 5 --- Run script: --- # Crash reproducer for clang version 11.0.0 (https://github.com/llvm/llvm-project.git 56b7f595d2b402ff177ca42214325c8fdea10fb0) # Driver args: "-x" "c" "-o" "/dev/null" "test1.c" # Original command: "/home/rxz226/llvm-project/bld_instru/bin/clang-11" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" "-main-file-name" "test1.c" "-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" "/home/rxz226/llvm-project/bld_instru/lib/clang/11.0.0" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/home/rxz226/llvm-project/bld_instru/lib/clang/11.0.0/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir" "/home/rxz226/fuzzing/2020-02-02/clang/hangs/test" "-ferror-limit" "19" "-fmessage-length" "0" "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-faddrsig" "-o" "/tmp/test1-076316.o" "-x" "c" "test1.c" "/home/rxz226/llvm-project/bld_instru/bin/clang-11" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" "-main-file-name" "test1.c" "-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" "-ferror-limit" "19" "-fmessage-length" "0" "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-faddrsig" "-x" "c" "test1-31d3ae.c" --- Stack dump: --- clang: /home/rxz226/llvm-project/clang/include/clang/AST/Expr.h:2707: const clang::Expr *clang::CallExpr::getArg(unsigned int) const: Assertion `Arg < getNumArgs() && "Arg access out of range!"' failed. Stack dump: 0. Program arguments: /home/rxz226/llvm-project/bld_instru/bin/clang -x c -o /dev/null test1.c 1. parser at end of file 2. test1.c:1:5: parsing function body 'a' 3. test1.c:1:5: in compound statement ('{}') #0 0x0681faf6 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:560:7 #1 0x0681ac5e llvm::sys::RunSignalHandlers() /home/rxz226/llvm-project/llvm/lib/Support/Signals.cpp:69:18 #2 0x0681dd30 llvm::sys::CleanupOnSignal(unsigned long) /home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:361:3 #3 0x0662a5aa (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:80:5 #4 0x0662a9e6 /home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:361:51 #5 0x7fc29911d390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390) #6 0x7fc297c87428 raise /build/glibc-LK5gWL/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0 #7 0x7fc297c8902a abort /build/glibc-LK5gWL/glibc-2.23/stdlib/abort.c:91:0 #8 0x7fc297c7fbd7 __assert_fail_base /build/glibc-LK5gWL/glibc-2.23/assert/assert.c:92:0 #9 0x7fc297c7fc82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82) #10 0x06fb3a35 (/home/rxz226/llvm-project/bld_instru/bin/clang+0x6fb3a35) #11 0x0e63a5c2 (anonymous namespace)::IntExprEvaluator::VisitBuiltinCallExpr(clang::CallExpr const*, unsigned int) /home/rxz226/llvm-project/clang/lib/AST/ExprConstant.cpp:10944:48 #12 0x0e5f0fe2 (anonymous namespace)::IntExprEvaluator::VisitCallExpr(clang::CallExpr const*) /home/rxz226/llvm-project/clang/lib/AST/ExprConstant.cpp:10629:12 #13 0x0e5e2e03 clang::StmtVisitorBase::Visit(clang::Stmt const*) /home/rxz226/llvm-project/bld_instru/tools/clang/include/clang/AST/StmtNodes.inc:0:1 #14 0x0e55077f Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) /home/rxz2 ... --- -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.or
[llvm-bugs] [Bug 44757] New: Assertion `E->isRValue() && E->getType()->hasPointerRepresentation()' failed.
https://bugs.llvm.org/show_bug.cgi?id=44757 Bug ID: 44757 Summary: Assertion `E->isRValue() && E->getType()->hasPointerRepresentation()' failed. Product: clang Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: changoch...@gmail.com CC: llvm-bugs@lists.llvm.org, neeil...@live.com, richard-l...@metafoo.co.uk poc: --- a() { int strlen(; strlen(3) - 5 --- Run script: --- # Crash reproducer for clang version 11.0.0 (https://github.com/llvm/llvm-project.git 56b7f595d2b402ff177ca42214325c8fdea10fb0) # Driver args: "-x" "c" "-o" "/dev/null" "test1.c" # Original command: "/home/rxz226/llvm-project/bld_instru/bin/clang-11" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" "-main-file-name" "test1.c" "-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" "/home/rxz226/llvm-project/bld_instru/lib/clang/11.0.0" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/home/rxz226/llvm-project/bld_instru/lib/clang/11.0.0/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir" "/home/rxz226/fuzzing/2020-02-02/clang/hangs/test" "-ferror-limit" "19" "-fmessage-length" "0" "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-faddrsig" "-o" "/tmp/test1-4e1946.o" "-x" "c" "test1.c" "/home/rxz226/llvm-project/bld_instru/bin/clang-11" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" "-main-file-name" "test1.c" "-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" "-ferror-limit" "19" "-fmessage-length" "0" "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-faddrsig" "-x" "c" "test1-c3980e.c" --- Stack dump: --- clang: /home/rxz226/llvm-project/clang/lib/AST/ExprConstant.cpp:7967: bool EvaluatePointer(const clang::Expr *, (anonymous namespace)::LValue &, (anonymous namespace)::EvalInfo &, bool): Assertion `E->isRValue() && E->getType()->hasPointerRepresentation()' failed. Stack dump: 0. Program arguments: /home/rxz226/llvm-project/bld_instru/bin/clang -x c -o /dev/null test1.c 1. parser at end of file 2. test1.c:1:5: parsing function body 'a' 3. test1.c:1:5: in compound statement ('{}') #0 0x0681faf6 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:560:7 #1 0x0681ac5e llvm::sys::RunSignalHandlers() /home/rxz226/llvm-project/llvm/lib/Support/Signals.cpp:69:18 #2 0x0681dd30 llvm::sys::CleanupOnSignal(unsigned long) /home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:361:3 #3 0x0662a5aa (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:80:5 #4 0x0662a9e6 /home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:361:51 #5 0x7fb12029b390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390) #6 0x7fb11ee05428 raise /build/glibc-LK5gWL/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0 #7 0x7fb11ee0702a abort /build/glibc-LK5gWL/glibc-2.23/stdlib/abort.c:91:0 #8 0x7fb11edfdbd7 __assert_fail_base /build/glibc-LK5gWL/glibc-2.23/assert/assert.c:92:0 #9 0x7fb11edfdc82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82) #10 0x0e59112a (/home/rxz226/llvm-project/bld_instru/bin/clang+0xe59112a) #11 0x0e63a5d7 (anonymous namespace)::IntExprEvaluator::VisitBuiltinCallExpr(clang::CallExpr const*, unsigned int) /home/rxz226/llvm-project/clang/lib/AST/ExprConstant.cpp:10944:10 #12 0x0e5f0fe2 (anonymous namespace)::IntExprEvaluator::VisitCallExpr(clang::CallExpr const*) /home/rxz226/llvm-project/clang/lib/AST/ExprConstant.cpp:10629:12 #13 0x0e5e2e03 clang::StmtVisitorBase::Visit(clang::Stmt const*) /home/rxz226/llvm-project/bld_instru/tools/clang/include/clang/AST/StmtNodes.inc:0:1 #14 0x0e55077f Evaluate(clang::APValue&, (anonymous namespace)::EvalInfo&, clang::Expr const*) /home/rxz226/llvm-project/clang/lib/AST/ExprConstant.cpp:13547:9 #15 0x0e5ed882 (anonymous namespace)::DataRecursiveIntBinOpEvaluator::EvaluateExpr(
[llvm-bugs] [Bug 44758] New: Assertion `D.getASTContext().getLangOpts().CPlusPlus' failed.
https://bugs.llvm.org/show_bug.cgi?id=44758 Bug ID: 44758 Summary: Assertion `D.getASTContext().getLangOpts().CPlusPlus' failed. Product: clang Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: changoch...@gmail.com CC: llvm-bugs@lists.llvm.org, neeil...@live.com, richard-l...@metafoo.co.uk POC: --- a() {struct {: ( {b ( --- Run script: --- # Crash reproducer for clang version 11.0.0 (https://github.com/llvm/llvm-project.git 56b7f595d2b402ff177ca42214325c8fdea10fb0) # Driver args: "-x" "c" "-o" "/dev/null" "test1.c" # Original command: "/home/rxz226/llvm-project/bld_instru/bin/clang-11" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" "-main-file-name" "test1.c" "-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" "/home/rxz226/llvm-project/bld_instru/lib/clang/11.0.0" "-internal-isystem" "/usr/local/include" "-internal-isystem" "/home/rxz226/llvm-project/bld_instru/lib/clang/11.0.0/include" "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" "-internal-externc-isystem" "/include" "-internal-externc-isystem" "/usr/include" "-fdebug-compilation-dir" "/home/rxz226/fuzzing/2020-02-02/clang/hangs/test" "-ferror-limit" "19" "-fmessage-length" "0" "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-faddrsig" "-o" "/tmp/test1-1e59a4.o" "-x" "c" "test1.c" "/home/rxz226/llvm-project/bld_instru/bin/clang-11" "-cc1" "-triple" "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" "-main-file-name" "test1.c" "-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" "-ferror-limit" "19" "-fmessage-length" "0" "-fgnuc-version=4.2.1" "-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-faddrsig" "-x" "c" "test1-19e090.c" --- Stack dump: --- clang: /home/rxz226/llvm-project/clang/lib/AST/Decl.cpp:2065: bool isDeclExternC(const T &) [T = clang::FunctionDecl]: Assertion `D.getASTContext().getLangOpts().CPlusPlus' failed. Stack dump: 0. Program arguments: /home/rxz226/llvm-project/bld_instru/bin/clang -x c -o /dev/null test1.c 1. test1.c:1:19: current parser token 'b' 2. test1.c:1:5: parsing function body 'a' 3. test1.c:1:5: in compound statement ('{}') 4. test1.c:1:6: parsing struct/union body '' 5. test1.c:1:18: in compound statement ('{}') #0 0x0681faf6 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:560:7 #1 0x0681ac5e llvm::sys::RunSignalHandlers() /home/rxz226/llvm-project/llvm/lib/Support/Signals.cpp:69:18 #2 0x0681dd30 llvm::sys::CleanupOnSignal(unsigned long) /home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:361:3 #3 0x0662a5aa (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) /home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:80:5 #4 0x0662a9e6 /home/rxz226/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:361:51 #5 0x7f74a81fc390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390) #6 0x7f74a6d66428 raise /build/glibc-LK5gWL/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0 #7 0x7f74a6d6802a abort /build/glibc-LK5gWL/glibc-2.23/stdlib/abort.c:91:0 #8 0x7f74a6d5ebd7 __assert_fail_base /build/glibc-LK5gWL/glibc-2.23/assert/assert.c:92:0 #9 0x7f74a6d5ec82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82) #10 0x0e3263f6 /home/rxz226/llvm-project/clang/lib/AST/Decl.cpp:2065:5 #11 0x0c1688a2 bool isIncompleteDeclExternC(clang::Sema&, clang::FunctionDecl const*) /home/rxz226/llvm-project/clang/lib/Sema/SemaDecl.cpp:6463:13 #12 0x0c13d913 clang::Sema::ActOnFunctionDeclarator(clang::Scope*, clang::Declarator&, clang::DeclContext*, clang::TypeSourceInfo*, clang::LookupResult&, llvm::MutableArrayRef, bool&) /home/rxz226/llvm-project/clang/lib/Sema/SemaDecl.cpp:9511:7 #13 0x0c12e334 clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&, llvm::MutableArrayRef) /home/rxz226/llvm-project/clang/lib/Sema/SemaDecl.cpp:5731:11 #14 0x0c12ba81 clang::Sema::ActOnDeclarator(clang::Scope*, clang::Declarator&) /home/rxz226/llvm-project/clang/lib/Sema/SemaDecl.cpp:5407:15 #15 0x0c0ed415 clang::Sema::ImplicitlyDefineFuncti