[llvm-bugs] [Bug 34858] New: clang-cl crash with constexpr ctor
https://bugs.llvm.org/show_bug.cgi?id=34858 Bug ID: 34858 Summary: clang-cl crash with constexpr ctor Product: clang Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: C++14 Assignee: unassignedclangb...@nondot.org Reporter: powerch...@web.de CC: llvm-bugs@lists.llvm.org struct S { constexpr S(int const & = 0) {} }; S a[2]; // crash, see log below and attached files S b[2] {}; // crash // In contrast: S c[2] {0}; // OK S d[1]; // OK S e[1] {}; // OK -- 1>Assertion failed: Result.isUninit() && "temporary created multiple times", file C:\src\llvm_package_314411\llvm\tools\clang\lib\AST\ExprConstant.cpp, line 1107 1>Wrote crash dump file "C:\Users\x\AppData\Local\Temp\CL.exe-308f23.dmp" 1>0x01E82CA8 (0x0016 0x04A7D360 0x768A8350 0x0003) 1>0x768453E2 (0x04A7E2AE 0x04A7D360 0x001803B8 0x058CCBBC), abort() + 0x32 bytes(s) 1>0x76846CE7 (0x0453 0x0ADD3A00 0x058CD7A0 0x058CCBCC), _get_wpgmptr() + 0x1777 bytes(s) 1>0x7684614B (0x0453 0x036AE040 0x001803A0 0x036AE040), _get_wpgmptr() + 0xBDB bytes(s) 1>0x76846DE6 (0x04A7E2AE 0x04A7D360 0x0453 0x058CCC44), _wassert() + 0x16 bytes(s) 1>0x036AE040 (0x 0x0ADD3B30 0x058CD7A0 0x0ADD3A00) 1>0x036A5F3C (0x774137EE 0x774E6E38 0x0050 0x000A) 1>0x036A21BA (0x058CCDC4 0x767CE7EB 0x000A 0x) 1>0x036A3B7D (0x058CD788 0x058CCEC0 0x00102800 0x268D563B) 1>0x03694C57 (0x058CD914 0x03634A6E 0x00129FF0 0x0ADD3B30) 1>0x02BF19E8 (0x00129FF0 0x0ADD3B30 0x0ADCBDD0 0x0001) 1>0x03634A6E (0x058CD930 0x058CD93C 0x058CD9B0 0x) 1>0x02BB0EE7 (0x 0x268D563B 0x058CD97C 0x058CD9A8) 1>clang-cl.exe : error : clang frontend command failed due to signal (use -v to see invocation) 1>clang version 6.0.0 (trunk) 1>Target: i686-pc-windows-msvc 1>Thread model: posix 1>InstalledDir: C:\Program Files (x86)\LLVM\msbuild-bin 1>clang-cl.exe: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. 1>clang-cl.exe: note: diagnostic msg: 1> 1> 1>PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: 1>Preprocessed source(s) and associated run script(s) are located at: 1>clang-cl.exe: note: diagnostic msg: C:\Users\x\AppData\Local\Temp\State1-fca48a.cpp 1>clang-cl.exe: note: diagnostic msg: C:\Users\x\AppData\Local\Temp\State1-fca48a.sh 1>clang-cl.exe: note: diagnostic msg: 1> 1> -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34859] New: Isel crash with large constant (csmith)
https://bugs.llvm.org/show_bug.cgi?id=34859 Bug ID: 34859 Summary: Isel crash with large constant (csmith) Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: Backend: SystemZ Assignee: unassignedb...@nondot.org Reporter: pauls...@linux.vnet.ibm.com CC: llvm-bugs@lists.llvm.org This (reduced) program: @g_272 = external global i64, align 8 @g_276 = external global i16, align 2 ; Function Attrs: noreturn nounwind define void @main(i32 signext) local_unnamed_addr #0 { store i16 -1, i16* @g_276, align 2 %2 = load i16, i16* @g_276, align 2 %3 = icmp ne i16 %2, 0 %4 = zext i1 %3 to i64 %5 = or i64 %4, 3944173009226982604 store i64 %5, i64* @g_272, align 8 tail call void @transparent_crc(i64 3944173009226982604, i32 signext undef) unreachable } declare void @transparent_crc(i64, i32 signext) local_unnamed_addr #1 + bin/llc -mtriple=s390x-linux-gnu -mcpu=z13 crashes with LLVM ERROR: Cannot select: t47: i64 = Constant<3944173007420784641> DAG: Optimized legalized selection DAG: BB#0 'main:' SelectionDAG has 25 nodes: t0: ch = EntryToken t45: i64 = SystemZISD::PCREL_WRAPPER TargetGlobalAddress:i64 0 t41: ch = store t0, Constant:i32<65535>, t45, undef:i64 t18: i64 = or Constant:i64<1>, OpaqueConstant:i64<3944173009226982604> t43: i64 = SystemZISD::PCREL_WRAPPER TargetGlobalAddress:i64 0 t34: ch = store t0, t18, t43, undef:i64 t35: ch = TokenFactor t41, t34 t24: ch,glue = callseq_start t35, TargetConstant:i64<0>, TargetConstant:i64<0> t28: ch,glue = CopyToReg t24, Register:i64 %R2D, OpaqueConstant:i64<3944173009226982604> t30: ch,glue = CopyToReg t28, Register:i64 %R3D, Constant:i64<0>, t28:1 t26: i64 = SystemZISD::PCREL_WRAPPER TargetGlobalAddress:i64 0 t32: ch,glue = SystemZISD::CALL t30, t26, Register:i64 %R2D, Register:i64 %R3D, RegisterMask:Untyped, t30:1 t33: ch,glue = callseq_end t32, TargetConstant:i64<0>, TargetConstant:i64<0>, t32:1 -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34712] --hash-style=both by default (like recent ld.bfd and ld.gold)
https://bugs.llvm.org/show_bug.cgi?id=34712 George Rimar changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #2 from George Rimar --- r315051 + r315052 -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34705] Crash when a symbol references external version definition
https://bugs.llvm.org/show_bug.cgi?id=34705 George Rimar changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #8 from George Rimar --- r315053 + r315054. -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34860] New: Csmith program gives bad checksum with -disable-basicaa
https://bugs.llvm.org/show_bug.cgi?id=34860 Bug ID: 34860 Summary: Csmith program gives bad checksum with -disable-basicaa Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: enhancement Priority: P Component: Common Code Generator Code Assignee: unassignedb...@nondot.org Reporter: pauls...@linux.vnet.ibm.com CC: llvm-bugs@lists.llvm.org Created attachment 19247 --> https://bugs.llvm.org/attachment.cgi?id=19247&action=edit bugpoint reduced testcase with same checksums / options Preprocessed orinal c-program: wrong10.i 49B9B5C5: /root/llvm/build/llvm-dev/bin/clang -O3 -march=z13 wrong10.c -I/root/csmith/runtime -o a.out -w 5FFE0748: /root/llvm/build/llvm-dev/bin/clang -O3 -march=z13 wrong10.c -I/root/csmith/runtime -o a.out -w -mllvm -disable-basicaa (Out of 15 builds with randomized options did all but one gave checksum 49B9B5C5). reduced program (also prints a number of other lines): wrong10.reduced.bc /root/llvm/build/llvm-dev/bin/clang -O3 -march=z13 ./wrong10.reduced.bc -o a.out -w; ./a.out |& grep checksum checksum = 49B9B5C5 /root/llvm/build/llvm-dev/bin/clang -O3 -march=z13 ./wrong10.reduced.bc -o a.out -w -mllvm -disable-basicaa; ./a.out |& grep checksum checksum = 5FFE0748 Note : the commits were: LLVM : e5e1c85 / trunk@314416 clang: 0e1f5c3 / cfe/trunk@314391 -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 10114] EltsFromConsecutiveLoads does not preserve chain successor dependencies from the original loads.
https://bugs.llvm.org/show_bug.cgi?id=10114 Artur Pilipenko changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #7 from Artur Pilipenko --- Yes, fixed by https://reviews.llvm.org/rL314988. -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34861] New: backport SVN r313398 to 5.1
https://bugs.llvm.org/show_bug.cgi?id=34861 Bug ID: 34861 Summary: backport SVN r313398 to 5.1 Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: Bitcode Reader Assignee: unassignedb...@nondot.org Reporter: compn...@compnerd.org CC: llvm-bugs@lists.llvm.org We should back port SVN r313398 to the 5.1 release as that can break LTO compatibility across releases. -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34862] New: clang crashes compiling "volatile long double resld = __builtin_canonicalizel(LD)"
https://bugs.llvm.org/show_bug.cgi?id=34862 Bug ID: 34862 Summary: clang crashes compiling "volatile long double resld = __builtin_canonicalizel(LD)" Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Backend: X86 Assignee: unassignedb...@nondot.org Reporter: ahata...@gmail.com CC: llvm-bugs@lists.llvm.org clang crashes when compiling the following code: $ cat canon-crash.c void test_float_builtin_ops(long double LD) { volatile long double resld = __builtin_canonicalizel(LD); } $ clang canon-crash.c -Os -o - -S fatal error: error in backend: Cannot select: t7: f80 = fcanonicalize t3 t3: f80,ch = load t0, FrameIndex:i64<-1>, undef:i64 t1: i64 = FrameIndex<-1> t2: i64 = undef In function: test_float_builtin_ops -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34863] New: Call frame optimization fails for immediate arguments of 0 or -1
https://bugs.llvm.org/show_bug.cgi?id=34863 Bug ID: 34863 Summary: Call frame optimization fails for immediate arguments of 0 or -1 Product: libraries Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: Backend: X86 Assignee: unassignedb...@nondot.org Reporter: david.l.kreit...@intel.com CC: llvm-bugs@lists.llvm.org The X86CallFrameOptimization fails to recognize outgoing parameter stores of 0, -1 that are implemented using AND, OR. So we are missing out on some opportunities to use PUSH instead of MOV. bash-4.2$ cat t.ll declare void @f2(i32, i32, i32, i32, i32, i32, i32, i32) define void @f1(i32 %x) minsize nounwind { entry: tail call void @f2(i32 %x, i32 %x, i32 %x, i32 %x, i32 %x, i32 %x, i32 0, i32 -1) #2 ret void } bash-4.2$ llc -mtriple=i686-unknown-unknown t.ll -o - .text .file "t.ll" .globl f1 # -- Begin function f1 .p2align4, 0x90 .type f1,@function f1: # @f1 # BB#0: # %entry subl$32, %esp movl36(%esp), %eax movl%eax, 20(%esp) movl%eax, 16(%esp) movl%eax, 12(%esp) movl%eax, 8(%esp) movl%eax, 4(%esp) movl%eax, (%esp) orl $-1, 28(%esp) andl$0, 24(%esp) calll f2 addl$32, %esp retl .Lfunc_end0: .size f1, .Lfunc_end0-f1 # -- End function .section".note.GNU-stack","",@progbits bash-4.2$ llc -mtriple=x86_64-unknown-unknown t.ll -o - .text .file "t.ll" .globl f1 # -- Begin function f1 .p2align4, 0x90 .type f1,@function f1: # @f1 # BB#0: # %entry subq$24, %rsp orl $-1, 8(%rsp) andl$0, (%rsp) movl%edi, %esi movl%edi, %edx movl%edi, %ecx movl%edi, %r8d movl%edi, %r9d callq f2 addq$24, %rsp retq .Lfunc_end0: .size f1, .Lfunc_end0-f1 # -- End function .section".note.GNU-stack","",@progbits -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34864] New: Deadlock inside llvm::parallel::TaskList::spawn stops LLD compiled with MinGW-w64
https://bugs.llvm.org/show_bug.cgi?id=34864 Bug ID: 34864 Summary: Deadlock inside llvm::parallel::TaskList::spawn stops LLD compiled with MinGW-w64 Product: libraries Version: trunk Hardware: Other OS: Linux Status: NEW Severity: enhancement Priority: P Component: Support Libraries Assignee: unassignedb...@nondot.org Reporter: vasek.ge...@gmail.com CC: llvm-bugs@lists.llvm.org I managed to build the latest trunk with MinGW-w64 GCC 7.1.0 (posix-seh) and it works fine producing cross-platform code. During the tests I noticed that linking an ELF target on Windows host platform with LLD results in a deadlock in llvm::parallel::TaskList::spawn (basically, here: https://llvm.org/doxygen/Parallel_8cpp_source.html#l0098 ). The correct ELF file is produced only if -Wlm--no-threads switch is added to clang command line. I tried to change the add() function like described here: https://stackoverflow.com/questions/15912322/condition-variable-deadlock but the deadlock moved into ~Latch destructor. -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 33430] [ubsan] false negative: pointer overflow check misses subtractions with unsigned offsets
https://bugs.llvm.org/show_bug.cgi?id=33430 Vedant Kumar changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Vedant Kumar --- This was fixed in cfe/r307955 -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34865] New: Clang doesn't require references to be listed in lambda capture
https://bugs.llvm.org/show_bug.cgi?id=34865 Bug ID: 34865 Summary: Clang doesn't require references to be listed in lambda capture Product: clang Version: 5.0 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: C++11 Assignee: unassignedclangb...@nondot.org Reporter: redbeard0...@gmail.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Clang will compile this faulty code without an error: int var = 0; int main() { int& varRef = var; return []{return varRef;}(); } This also leads to an incorrect warning if varRef is correctly captured (which is how we noticed this issue in the first place): > clang++ test2.cpp --std=c++17 -Wall test2.cpp:4:14: warning: lambda capture 'varRef' is not required to be captured for this use [-Wunused-lambda-capture] return [&varRef]{return varRef;}(); ^ This is a reduced example from this real-world code: https://github.com/mongodb/mongo/blob/r3.5.13/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp#L383-L402 (clang++-5.0 -Wall warns that kRsOplogNamespace is unused even though it is used on line 402) -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34243] Clang should default to -fms-compatibility-version=19.11
https://bugs.llvm.org/show_bug.cgi?id=34243 Reid Kleckner changed: 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 http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34849] clang-cl fails to dllexport specialization of class template member function when the class template is dllexport
https://bugs.llvm.org/show_bug.cgi?id=34849 Reid Kleckner changed: What|Removed |Added Resolution|FIXED |--- CC||r...@google.com Status|RESOLVED|REOPENED --- Comment #2 from Reid Kleckner --- Had to revert due to base.dll link failures in Chromium. -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34866] New: [Regression] Infinite loop in SoftenFloatOperand
https://bugs.llvm.org/show_bug.cgi?id=34866 Bug ID: 34866 Summary: [Regression] Infinite loop in SoftenFloatOperand Product: libraries Version: 5.0 Hardware: PC OS: Windows NT Status: NEW Severity: enhancement Priority: P Component: Common Code Generator Code Assignee: unassignedb...@nondot.org Reporter: bma...@codeaurora.org CC: c...@google.com, florian.h...@arm.com, llvm-bugs@lists.llvm.org, mcros...@codeaurora.org Blocks: 34492 The following code no longer compiles: $ cat test.c typedef unsigned __int128 u128_t; typedef __float128 f128_t; typedef union { f128_t f; u128_t i; } union128_t; int test(volatile f128_t *start_X_ptr, volatile f128_t *start_Y_ptr) { for (unsigned iter_count = 1; iter_count <= 2; iter_count++) { union128_t read_valX = { .f = *start_X_ptr }; union128_t read_valY = { .f = *start_Y_ptr }; u128_t expected_val = ((iter_count - 1) * read_valY.i); if (read_valX.i != expected_val) { return -1; } union128_t write_valX = { .i = (iter_count * (read_valX.i + 1)) }; union128_t write_valY = { .i = (read_valX.i + 1) }; *start_X_ptr = write_valX.f; *start_Y_ptr = write_valY.f; } return 0; } because of an infinite loop in SoftenFloatOperand. $ clang -O3 -c test.c -mllvm -debug-only=legalize-types Soften float operand 0: t33: v16i8 = bitcast t20 Soften float operand 0: t33: v16i8 = bitcast t20 Soften float operand 0: t33: v16i8 = bitcast t20 Soften float operand 0: t33: v16i8 = bitcast t20 Soften float operand 0: t33: v16i8 = bitcast t20 Soften float operand 0: t33: v16i8 = bitcast t20 Soften float operand 0: t33: v16i8 = bitcast t20 Soften float operand 0: t33: v16i8 = bitcast t20 Works with LLVM4.0.1: https://godbolt.org/g/W8cULV I suspect this was introduced in r254653 and got exposed sometime between 03/14/2017 and 03/17/2017. Referenced Bugs: https://bugs.llvm.org/show_bug.cgi?id=34492 [Bug 34492] [meta] 5.0.1 Release Blockers -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
[llvm-bugs] [Bug 34867] New: Merge r315086 to 5.0.1
https://bugs.llvm.org/show_bug.cgi?id=34867 Bug ID: 34867 Summary: Merge r315086 to 5.0.1 Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: Bitcode Reader Assignee: unassignedb...@nondot.org Reporter: compn...@compnerd.org CC: llvm-bugs@lists.llvm.org -- You are receiving this mail because: You are on the CC list for the bug.___ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs