<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 - Assertion failure for thinLTO + --save-temps + non-ascii file name"
   href="https://bugs.llvm.org/show_bug.cgi?id=47902">47902</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure for thinLTO + --save-temps + non-ascii file name
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>ELF
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jh7370.2008@my.bristol.ac.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I was writing a test based on an internal test that made sure the linker could
handle non-ascii filenames when LTO was used. Whilst experimenting with LLD's
--save-temps option, I noticed that the linker will assert when a Thin bitcode
file is passed in, with a non-ascii name (but not when the --save-temps option
is not specified, nor for regular LTO. This is the lit test I was writing:

; REQUIRES: x86

;; Show that both regular LTO and ThinLTO work correctly when an input file
uses
;; a non-ascii filename.

;; Regular LTO.
; RUN: llvm-as %s -o %t£.o
; RUN: ld.lld %t£.o -o %t --save-temps
; RUN: llvm-readelf -s %t | FileCheck %s

;; Thin LTO.
; RUN: opt -module-summary %s -o %t-thin£.o
; RUN: ld.lld %t-thin£.o -o %t-thin --save-temps
; RUN: llvm-readelf -s %t-thin | FileCheck %s

; CHECK: _start

target datalayout =
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@_start = global i32 0

(The llvm-readelf lines probably would want replacing with checks that the
appropriate temporary files have been created). The following assertion is
fired when it gets to the thinLTO link.

Assertion failed: (Val & ~(~0U >> (32-NumBits))) == 0 && "High bits set!", file
C:\llvm\llvm-project\llvm\include\llvm/Bitstream/BitstreamWriter.h, line 204</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>