[llvm-bugs] [Bug 35416] New: "fragment covers entire variable" error in Windows selfhost build

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 24 15:05:55 PST 2017


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

            Bug ID: 35416
           Summary: "fragment covers entire variable" error in Windows
                    selfhost build
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: greg.bedwell at sony.com
                CC: aprantl at apple.com, llvm-bugs at lists.llvm.org,
                    rnk at google.com, russell_gallop at sn.scee.net

Spotted when setting up a Windows x64 selfhost clang build.

Looks like it started appearing in r318203 - "Make salvageDebugInfo of casts
work for dbg.declare and dbg.addr".  Superficially, looks a bit like Bug 34390,
but I've not had a chance to look at the error in any detail tonight
unfortunately.

Reduced testcase:

$ type 2.cpp
// ==========================================
struct A { double x1[]; };
struct x2 {
  x2(int) : x3() {}
  int x3;
};
int x4();
x2 x5() {
  x2 a(x4());
  return a;
}
void *operator new(size_t, void *);
struct B {
  B() { new (x8.x1) x2(x5()); }
  A x8;
};
void x9() { B(); }
// ==========================================

$
C:\work\public-git\upstream-llvm\build-vs2015-native-master\Release\bin\clang.exe
-c 2.cpp -O2 -g -target x86_64-pc-windows-msvc
fragment covers entire variable
  tail call void @llvm.dbg.value(metadata i32 0, metadata !20, metadata
!DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !67
!20 = !DILocalVariable(name: "a", scope: !8, file: !1, line: 9, type: !11)
fragment covers entire variable
  tail call void @llvm.dbg.value(metadata i32 0, metadata !20, metadata
!DIExpression(DW_OP_LLVM_fragment, 0, 32)), !dbg !67
!20 = !DILocalVariable(name: "a", scope: !8, file: !1, line: 9, type: !11)
fatal error: error in backend: Broken module found, compilation aborted!
clang.exe: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 6.0.0 (trunk 318960) (llvm/trunk 318966)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir:
C:\work\public-git\upstream-llvm\build-vs2015-native-master\Release\bin
clang.exe: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang.exe: note: diagnostic msg:
********************

-- 
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/20171124/82ad9bb6/attachment.html>


More information about the llvm-bugs mailing list