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: unassignedclangb...@nondot.org
          Reporter: amir.sha...@gmail.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
                    neeil...@live.com, richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to