<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 - Attributor annotate dereferenceable(1) to void call site, and failed verifier"
   href="https://bugs.llvm.org/show_bug.cgi?id=48810">48810</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Attributor annotate dereferenceable(1) to void call site, and failed verifier
          </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>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>Interprocedural Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>zequanwu@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Here is the minimum repro.
repro.c:
a, b;
void *mempcpy(void *, *, long);
c(*) {
  char *d = mempcpy(d, a, b);
  *d = '\0';
  c(d);
}

repro.sh:
clang -mllvm -attributor-enable=module -O2 repro.c

error:
Wrong types for attribute: inalloca nest noalias nocapture noundef nonnull
readnone readonly signext zeroext byref(void) byval(void) preallocated(void)
sret(void) align 1 dereferenceable(1) dereferenceable_or_null(1)
  tail call nonnull dereferenceable(1) void @llvm.memcpy.p0i8.p0i8.i64(i8*
align 1 undef, i8* readonly align 1 %3, i64 %conv1, i1 false) #3
in function c
fatal error: error in backend: Broken function found, compilation aborted!
clang-12: error: clang frontend command failed with exit code 70 (use -v to see
invocation)</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>