[llvm-bugs] [Bug 43406] New: Segfault when using const value of union type in a block with optimizations

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 23 07:14:40 PDT 2019


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

            Bug ID: 43406
           Summary: Segfault when using const value of union type in a
                    block with optimizations
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolas.pauss at intersec.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

Created attachment 22544
  --> https://bugs.llvm.org/attachment.cgi?id=22544&action=edit
Segault block union const source code

When using a const value of a union type defined outside a block inside a block
with optimizations, clang is crashing with Segmentation fault at
llvm::PointerType::get(llvm::Type*, unsigned int).

The whole code and clang backtrace can be seen here:
https://godbolt.org/z/wtsleX

The bug is present on clang 3.3 up to clang 8.0.0.
It appears to have been solved on clang 9.0.0.

-- 
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/20190923/0d003bfc/attachment.html>


More information about the llvm-bugs mailing list