[llvm-bugs] [Bug 35231] New: Clang fails to compile with flag fstrict-vtable-pointers on Windows

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Nov 7 12:18:50 PST 2017


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

            Bug ID: 35231
           Summary: Clang fails to compile with flag
                    fstrict-vtable-pointers on Windows
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: adamf88 at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19378
  --> https://bugs.llvm.org/attachment.cgi?id=19378&action=edit
files sh and cpp

If I compile such program:
struct basic_ios2
{
        virtual ~basic_ios2()
        {}
};

struct basic_istream2 : virtual public basic_ios2
{
};

struct basic_stringstream2 : public basic_istream2
{
};


int main()
{
        basic_stringstream2 ss;
        return 0;
}

Then I receive an error:

Instruction does not dominate all uses!
  %3 = bitcast i8* %2 to %struct.basic_stringstream2*
  %7 = bitcast %struct.basic_stringstream2* %3 to i8*
fatal error: error in backend: Broken function found, compilation aborted!

Compilation command:
clang-cl "-cc1" "-emit-obj" "-O2" "-fstrict-vtable-pointers"  test.cpp

In attachment clang generated files (sh + cpp)

Originally it comes from statement:
{
  std::stringstream ss;
}

-- 
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/20171107/3cc57502/attachment.html>


More information about the llvm-bugs mailing list