Liqiang Tao via llvm-dev
2021-Mar-25 15:25 UTC
[llvm-dev] Linker Error when building test-suite with PGO
Dear All, When I build test-suite with following option, -DTEST_SUITE_PROFILE_GENERATE=ON I got some errors. [ 83%] Building C object SingleSource/Regression/C/gcc-c-torture/execute/ieee/CMakeFiles/GCC-C-execute-ieee-fp-cmp-8e.dir/fp-cmp-8e.c.o [ 83%] Building C object SingleSource/Regression/C/gcc-c-torture/execute/ieee/CMakeFiles/GCC-C-execute-ieee-fp-cmp-3.dir/fp-cmp-3.c.o CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In function `test2': compare-fp-3.c:(.text+0x4d): undefined reference to `link_error0' CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In function `test3': compare-fp-3.c:(.text+0x8d): undefined reference to `link_error0' CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In function `test5': compare-fp-3.c:(.text+0x113): undefined reference to `link_error1' CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In function `test6': compare-fp-3.c:(.text+0x163): undefined reference to `link_error1' CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In function `all_tests': compare-fp-3.c:(.text+0x1f0): undefined reference to `link_error0' compare-fp-3.c:(.text+0x223): undefined reference to `link_error0' compare-fp-3.c:(.text+0x2f6): undefined reference to `link_error1' compare-fp-3.c:(.text+0x344): undefined reference to `link_error1' [ 83%] Linking C executable GCC-C-execute-ieee-fp-cmp-1 clang-12: error: linker command failed with exit code 1 (use -v to see invocation) [ 83%] Building C object SingleSource/Regression/C/gcc-c-torture/execute/ieee/CMakeFiles/GCC-C-execute-ieee-fp-cmp-8l.dir/fp-cmp-8l.c.o There errors won't appear if -DTEST_SUITE_PROFILE_GENERATE=OFF. I got no idea from these error messages. Please allow me to ask for help here. Has anyone met errors like these before? I appreciate for your help. Best Wishes, Liqiang Tao -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210326/019c98a0/attachment.html>
Xinliang David Li via llvm-dev
2021-Mar-25 17:04 UTC
[llvm-dev] Linker Error when building test-suite with PGO
There might be a bug in the compiler exposed with instrumentation on. The reference to link_error0 is guarded by a conditional branch which evaluates to be false -- but the compiler fails to simplify it away leading to linker error. David On Thu, Mar 25, 2021 at 8:25 AM Liqiang Tao via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Dear All, > > When I build test-suite with following option, > -DTEST_SUITE_PROFILE_GENERATE=ON > > I got some errors. > [ 83%] Building C object > SingleSource/Regression/C/gcc-c-torture/execute/ieee/CMakeFiles/GCC-C-execute-ieee-fp-cmp-8e.dir/fp-cmp-8e.c.o > [ 83%] Building C object > SingleSource/Regression/C/gcc-c-torture/execute/ieee/CMakeFiles/GCC-C-execute-ieee-fp-cmp-3.dir/fp-cmp-3.c.o > CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In > function `test2': > compare-fp-3.c:(.text+0x4d): undefined reference to `link_error0' > CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In > function `test3': > compare-fp-3.c:(.text+0x8d): undefined reference to `link_error0' > CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In > function `test5': > compare-fp-3.c:(.text+0x113): undefined reference to `link_error1' > CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In > function `test6': > compare-fp-3.c:(.text+0x163): undefined reference to `link_error1' > CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In > function `all_tests': > compare-fp-3.c:(.text+0x1f0): undefined reference to `link_error0' > compare-fp-3.c:(.text+0x223): undefined reference to `link_error0' > compare-fp-3.c:(.text+0x2f6): undefined reference to `link_error1' > compare-fp-3.c:(.text+0x344): undefined reference to `link_error1' > [ 83%] Linking C executable GCC-C-execute-ieee-fp-cmp-1 > clang-12: error: linker command failed with exit code 1 (use -v to see > invocation) > [ 83%] Building C object > SingleSource/Regression/C/gcc-c-torture/execute/ieee/CMakeFiles/GCC-C-execute-ieee-fp-cmp-8l.dir/fp-cmp-8l.c.o > > There errors won't appear if -DTEST_SUITE_PROFILE_GENERATE=OFF. > > I got no idea from these error messages. Please allow me to ask for help > here. > Has anyone met errors like these before? I appreciate for your help. > > Best Wishes, > Liqiang Tao > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210325/74b45911/attachment.html>