<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - spec2000/176.gcc LTO link failure on IA64 HSW architecture after commit r278610"
   href="https://llvm.org/bugs/show_bug.cgi?id=30368">30368</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>spec2000/176.gcc LTO link failure on IA64 HSW architecture after commit r278610
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>Linker
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sergey.k.okunev@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>denis.briltz@intel.com, llvm-bugs@lists.llvm.org, mehdi.amini@apple.com, sergey.k.okunev@gmail.com, sergos.gnu@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Bisect analysis showed LLVM revision 278610 is responsible for the fail. The
comments to commit are the following.

commit c5432bdac59045fae393f01258ec6972c539904d
Author: Mehdi Amini <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>>
Date:   Sat Aug 13 23:31:53 2016 +0000

    Fix bitcode auto-upgrade when using bitcode lazy loading

    The auto-upgrade path could be called before the VST (global
    names) was fully parsed, and thus intrinsic names were not
    available and the autoupgrade logic could not operate.

    Fix link failures with ThinLTO.

    git-svn-id: <a href="https://llvm.org/svn/llvm-project/llvm/trunk@278610">https://llvm.org/svn/llvm-project/llvm/trunk@278610</a>
91177308-0d34-0410-b5e6-96231b3b80d8

LLVM-clang options: -m64 -fuse-ld=gold -static -O2 -ffast-math -flto
-mfpmath=sse -march=core-avx2

The failure is reproduced in applying both ld.gold and ld.bfd linker.
Linker gives the following error message.

clang   -m64  -O2 -ffast-math -static -flto -fuse-ld=gold -mfpmath=sse
-march=core-avx2        -DSPEC_CPU2000_LP64 c-parse.o c-lang.o c-lex.o
c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o function.o
stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o rtl.o print-rtl.o
rtlanal.o emit-rtl.o real.o dbxout.o sdbout.o dwarfout.o xcoffout.o integrate.o
jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o regclass.o local-alloc.o
global.o reload.o reload1.o caller-save.o insn-peep.o reorg.o sched.o final.o
recog.o reg-stack.o insn-opinit.o insn-recog.o insn-extract.o insn-output.o
insn-emit.o insn-attrtab.o m88k.o getpwd.o convert.o bc-emit.o bc-optab.o
obstack.o   -lm  -o cc1
………………………………….
/tmp/lto-llvm-ca497d.o:ld-temp.o:function emit_no_conflict_block: error:
undefined reference to 'reload_in_progress'
/tmp/lto-llvm-ca497d.o:ld-temp.o:function gen_move_insn: error: undefined
reference to 'reload_in_progress'
/tmp/lto-llvm-ca497d.o:ld-temp.o:function gen_rtx: error: undefined reference
to 'reload_in_progress'
/tmp/lto-llvm-ca497d.o:ld-temp.o:function gen_reg_rtx: error: undefined
reference to 'reload_in_progress'
clang-4.0: error: linker command failed with exit code 1 (use -v to see
invocation)


Okunev Sergey,
Software Engineer
Intel Compiler Team</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>