summaryrefslogtreecommitdiff
path: root/test/fuzzer/dead-stripping.test
blob: 280617bc3e36dd51c4411e7a3a1d841f46e1e284 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
REQUIRES: darwin

No dead_strip. Unused code is not removed.
RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t
RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker
RUN: %run %t -runs=0 2>&1 | FileCheck %s

With dead_strip. Unused code is (currently) not removed. (It would be better if it was removed!)
RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t -ffunction-sections -Wl,-dead_strip
RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker
RUN: %run %t -runs=0 2>&1 | FileCheck %s

CHECK-NOT: ERROR: The size of coverage PC tables does not match