<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 - Crash when building Linux kernel’s multi_v5_defconfig’s kernel/trace/trace_clock.o"
   href="https://bugs.llvm.org/show_bug.cgi?id=45335">45335</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash when building Linux kernel’s multi_v5_defconfig’s kernel/trace/trace_clock.o
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Backend: ARM
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>natechancellor@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com, Ties.Stuij@arm.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>With assertions enabled:

$ curl -LSs <a href="https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.5.13.tar.xz">https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.5.13.tar.xz</a> |
tar xJf -

$ cd linux-5.5.13

$ make -j$(nproc) -s ARCH=arm CC=clang CROSS_COMPILE=arm-linux-gnueabi-
O=out/arm32 distclean multi_v5_defconfig kernel/trace/trace_clock.o
fragment covers entire variable
!1079 = !DIGlobalVariableExpression(var: !1074, expr:
!DIExpression(DW_OP_LLVM_fragment, 0, 64))
!1074 = distinct !DIGlobalVariable(name: "trace_clock_struct", scope: !2, file:
!1057, line: 89, type: !1075, isLocal: true, isDefinition: true)
fatal error: error in backend: Broken module found, compilation aborted!
clang-11: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
...

creduce spits out:

$ cat trace_clock.i
typedef struct {
} a;
static struct {
  long b;
  a c
} d;
e() {
  long f = d.b + 1;
  d.b = f;
}

$ clang —O2 —-target=arm-linux-gnueabi -march=armv5te -g -c -o /dev/null
trace_clock.i
fragment covers entire variable
!0 = !DIGlobalVariableExpression(var: !1, expr:
!DIExpression(DW_OP_LLVM_fragment, 0, 32))
!1 = distinct !DIGlobalVariable(name: "d", scope: !2, file: !3, line: 6, type:
!7, isLocal: true, isDefinition: true)
fatal error: error in backend: Broken module found, compilation aborted!

Full preprocessed source and interestingness test available at
<a href="https://github.com/nathanchance/creduce-files/tree/d09780fbcf83f4707527f6bf6e553c79ea43d5e4/multi_v5_defconfig-trace_clock-crash">https://github.com/nathanchance/creduce-files/tree/d09780fbcf83f4707527f6bf6e553c79ea43d5e4/multi_v5_defconfig-trace_clock-crash</a></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>