[llvm-bugs] [Bug 36159] New: Non-determinism exposed by microsoft-abi-virtual-inheritance.cpp test

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 30 17:27:41 PST 2018


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

            Bug ID: 36159
           Summary: Non-determinism exposed by
                    microsoft-abi-virtual-inheritance.cpp test
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: peter at pcc.me.uk
                CC: llvm-bugs at lists.llvm.org

$ clang -cc1 -internal-isystem .../lib/clang/7.0.0/include -nostdsysteminc
.../clang/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp -fno-rtti
-std=c++11 -Wno-inaccessible-base -triple=i386-pc-win32 -emit-llvm -o - >
/tmp/1
$ clang -cc1 -internal-isystem .../lib/clang/7.0.0/include -nostdsysteminc
.../clang/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp -fno-rtti
-std=c++11 -Wno-inaccessible-base -triple=i386-pc-win32 -emit-llvm -o - | diff
-u /tmp/1 -

shows a diff most of the time, e.g.

--- /tmp/1      2018-01-30 17:18:22.750623402 -0800
+++ -   2018-01-30 17:28:37.603706299 -0800
@@ -618,10 +618,10 @@
   %vbptr16 = getelementptr inbounds i8, i8* %35, i32 0
   %36 = bitcast i8* %vbptr16 to i32**
   %vbtable17 = load i32*, i32** %36, align 4
-  %37 = getelementptr inbounds i32, i32* %vbtable17, i32 1
+  %37 = getelementptr inbounds i32, i32* %vbtable17, i32 2
   %vbase_offs18 = load i32, i32* %37, align 4
   %38 = add nsw i32 0, %vbase_offs18
-  %vtordisp.value19 = sub i32 %38, 8
+  %vtordisp.value19 = sub i32 %38, 16
   %39 = getelementptr inbounds i8, i8* %32, i32 %38
   %40 = getelementptr i8, i8* %39, i32 -4
   %vtordisp.ptr20 = bitcast i8* %40 to i32*
@@ -630,10 +630,10 @@
   %vbptr21 = getelementptr inbounds i8, i8* %41, i32 0
   %42 = bitcast i8* %vbptr21 to i32**
   %vbtable22 = load i32*, i32** %42, align 4
-  %43 = getelementptr inbounds i32, i32* %vbtable22, i32 2
+  %43 = getelementptr inbounds i32, i32* %vbtable22, i32 1
   %vbase_offs23 = load i32, i32* %43, align 4
   %44 = add nsw i32 0, %vbase_offs23
-  %vtordisp.value24 = sub i32 %44, 16
+  %vtordisp.value24 = sub i32 %44, 8
   %45 = getelementptr inbounds i8, i8* %32, i32 %44
   %46 = getelementptr i8, i8* %45, i32 -4
   %vtordisp.ptr25 = bitcast i8* %46 to i32*

-- 
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/20180131/57ff4c29/attachment.html>


More information about the llvm-bugs mailing list