<div dir="ltr">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.<div><br></div><div>David</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 25, 2021 at 8:25 AM Liqiang Tao via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear All,</div><div><br></div><div>When I build test-suite with following option, <br></div><div>-DTEST_SUITE_PROFILE_GENERATE=ON <br></div><div><br></div><div>
I got some errors.
</div><div>[ 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<br>[ 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<br>CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In function `test2':<br>compare-fp-3.c:(.text+0x4d): undefined reference to `link_error0'<br>CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In function `test3':<br>compare-fp-3.c:(.text+0x8d): undefined reference to `link_error0'<br>CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In function `test5':<br>compare-fp-3.c:(.text+0x113): undefined reference to `link_error1'<br>CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In function `test6':<br>compare-fp-3.c:(.text+0x163): undefined reference to `link_error1'<br>CMakeFiles/GCC-C-execute-ieee-compare-fp-3.dir/compare-fp-3.c.o: In function `all_tests':<br>compare-fp-3.c:(.text+0x1f0): undefined reference to `link_error0'<br>compare-fp-3.c:(.text+0x223): undefined reference to `link_error0'<br>compare-fp-3.c:(.text+0x2f6): undefined reference to `link_error1'<br>compare-fp-3.c:(.text+0x344): undefined reference to `link_error1'<br>[ 83%] Linking C executable GCC-C-execute-ieee-fp-cmp-1<br>clang-12: error: linker command failed with exit code 1 (use -v to see invocation)<br>[ 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</div><div><br></div><div>There errors won't appear if
-DTEST_SUITE_PROFILE_GENERATE=OFF.
</div><div><br></div><div>I got no idea from these error messages. Please allow me to ask for help here.</div><div>Has anyone met errors like these before? I appreciate for your help.</div><div><br></div><div>
Best Wishes,<br>Liqiang Tao
</div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>