<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - "fragment is larger than or outside of variable" error in Windows selfhost build"
   href="https://bugs.llvm.org/show_bug.cgi?id=35447">35447</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"fragment is larger than or outside of variable" error in Windows selfhost build
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>greg.bedwell@sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>aprantl@apple.com, llvm-bugs@lists.llvm.org, rnk@google.com, russell_gallop@sn.scee.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The fix from <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - "fragment covers entire variable" error in Windows selfhost build"
   href="show_bug.cgi?id=35416">Bug 35416</a> 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 <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - "fragment covers entire variable" error in Windows selfhost build"
   href="show_bug.cgi?id=35416">Bug 35416</a>, 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
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang.exe: note: diagnostic msg:
********************</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>