]> git.proxmox.com Git - rustc.git/blob - src/libcompiler_builtins/compiler-rt/test/fuzzer/gc-sections.test
New upstream version 1.25.0+dfsg1
[rustc.git] / src / libcompiler_builtins / compiler-rt / test / fuzzer / gc-sections.test
1 REQUIRES: linux
2
3 No gc-sections:
4 RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t
5 RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker | count 1
6
7 With gc-sections. Currently, we can't remove unused code.
8 DISABLED: %cpp_compiler %S/GcSectionsTest.cpp -o %t -ffunction-sections -Wl,-gc-sections
9 DISABLED: nm %t | grep UnusedFunctionShouldBeRemovedByLinker | count 1
10
11 With gc sections, with trace-pc. Unused code is removed.
12 RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t -fsanitize-coverage=0 -fsanitize-coverage=trace-pc -ffunction-sections -Wl,-gc-sections
13 RUN: nm %t | not grep UnusedFunctionShouldBeRemovedByLinker