[llvm-bugs] [Bug 48810] New: Attributor annotate dereferenceable(1) to void call site, and failed verifier

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 19 18:26:48 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=48810

            Bug ID: 48810
           Summary: Attributor annotate dereferenceable(1) to void call
                    site, and failed verifier
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: zequanwu at google.com
                CC: llvm-bugs at lists.llvm.org

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)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210120/399e1728/attachment-0001.html>


More information about the llvm-bugs mailing list