[llvm-dev] Bug in use-list order serialization
Duncan P. N. Exon Smith via llvm-dev
llvm-dev at lists.llvm.org
Tue Mar 13 17:29:04 PDT 2018
Yes, this is a bug. Please file a PR, attach a .ll and/or .bc file, and CC me. Bonus points if you bugpoint reduce it first.
> On Feb 26, 2018, at 06:37, Daniel Pfister via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hello,
>
> I want to ask if incorrect serialization of a constant's use-list order
> is considered as a bug.
>
> While compiling some programs with
>
> clang -c -emit-llvm -O2 -g
>
> I noticed that for many of the bitcode files the verify-uselistorder
> tool terminates with output
>
> *** verify-uselistorder ***
> verify bitcode
> LLVM ERROR: use-list order changed
>
> where the mismatch is always for the constant i64 0. This happens both
> with version 5.0.1 and 6.0 RC3 of LLVM and clang. I managed to trigger
> this behavior with the following reduced test-case:
>
> #include <stdio.h>
> int main (int argc, char **argv) {
> struct M { char const *a; char const *b; } const map[] = {
> { "a", "b" },
> { NULL, NULL }
> };
> char const *foo = "foo";
> struct M const *m = map;
> while (m->a)
> m++;
> if (m->b)
> foo = m->b;
> printf("%s", foo);
> return 0;
> }
>
> Regards,
> Daniel
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list