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

            Bug ID: 35447
           Summary: "fragment is larger than or outside of 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: unassignedb...@nondot.org
          Reporter: greg.bedw...@sony.com
                CC: apra...@apple.com, llvm-bugs@lists.llvm.org,
                    r...@google.com, russell_gal...@sn.scee.net

The fix from Bug 35416 resolved that issue, however it seems that the file in
question (lib/Support/FileOutputBuffer.cpp) is still refusing to compile with
TOT clang.

Here's another source-level reduced testcase (it only looks subtly different to
the one from Bug 35416, so hopefully the fix is too):

$ type 1.cpp
// ======================================================
struct A {
  int _Myval2;
  A() : _Myval2() {}
};
struct B {
  double buffer[];
};
struct C {
  C(int) {}
  A _Mypair;
};
int getPtr();
struct D {
  C takePayload() {
    C Tmp(getPtr());
    return Tmp;
  }
} Dd;
void *operator new(size_t, void *);
struct F {
  F(D Err) : HasError() {
    C *e = (C *)(ErrorStorage.buffer);
    new (e) C(Err.takePayload());
  }
  B ErrorStorage;
  bool HasError;
};
F fn2() { return Dd; }
void fn3() { fn2(); }
// ======================================================

$ clang.exe -target x86_64-windows-pc-msvc -c -w -g -O2 1.cpp
fragment is larger than or outside of variable
  call void @llvm.dbg.value(metadata i8 0, metadata !72, metadata
!DIExpression(DW_OP_LLVM_fragment, 64, 8)), !dbg !105
!72 = !DILocalVariable(name: "Tmp", scope: !70, file: !3, line: 16, type: !7)
fragment is larger than or outside of variable
  call void @llvm.dbg.value(metadata i8 0, metadata !72, metadata
!DIExpression(DW_OP_LLVM_fragment, 64, 8)), !dbg !105
!72 = !DILocalVariable(name: "Tmp", scope: !70, file: !3, line: 16, type: !7)
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 319007) (llvm/trunk 319177)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir:
C:\work\public-git\upstream-llvm\build-vs2015-ps4-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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to