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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to