[llvm-bugs] [Bug 41205] New: Clang-5+ crashes running llvm::sroa::AllocaSlices::SliceBuilder::visitStoreInst

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 22 11:43:37 PDT 2019


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

            Bug ID: 41205
           Summary: Clang-5+ crashes running
                    llvm::sroa::AllocaSlices::SliceBuilder::visitStoreInst
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: amir.shavit at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

A minimal example to produce the crash:

#include <optional>
#include <string>

struct A {
    std::string s;
};

struct B : A {
    std::optional<int> maybe;
};

B test() { 
    return {"one", 1};
}

Compile with -O3 -std=c++17 
Crashes clang 5/6/7/8/trunk.

Also available here: https://godbolt.org/z/uxyY8u

-- 
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/20190322/df16290e/attachment.html>


More information about the llvm-bugs mailing list