3 No dead_strip. Unused code is not removed.
4 RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t
5 RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker
6 RUN: %run %t -runs=0 2>&1 | FileCheck %s
8 With dead_strip. Unused code is (currently) not removed. (It would be better if it was removed!)
9 RUN: %cpp_compiler %S/GcSectionsTest.cpp -o %t -ffunction-sections -Wl,-dead_strip
10 RUN: nm %t | grep UnusedFunctionShouldBeRemovedByLinker
11 RUN: %run %t -runs=0 2>&1 | FileCheck %s
13 CHECK-NOT: ERROR: The size of coverage PC tables does not match