1*e69092beSFangrui Song /// Test that llvm-cov supports gcov 9 compatible format. 2*e69092beSFangrui Song #include <math.h> 3*e69092beSFangrui Song #include <stdio.h> main()4*e69092beSFangrui Songint main() { // GCOV: 1: [[@LINE]]:int main 5*e69092beSFangrui Song double a[11], result; // GCOV-NEXT: -: [[@LINE]]: 6*e69092beSFangrui Song for (int i = 0; i < 11; i++) // GCOV-NEXT: 12: [[@LINE]]: 7*e69092beSFangrui Song scanf("%lf", &a[i]); // GCOV-NEXT: 11: [[@LINE]]: 8*e69092beSFangrui Song for (int i = 10; i >= 0; i--) { // GCOV-NEXT: 12: [[@LINE]]: 9*e69092beSFangrui Song result = sqrt(fabs(a[i])) + 5 * pow(a[i], 3); // GCOV-NEXT: 11: [[@LINE]]: 10*e69092beSFangrui Song printf("\nf(%lf) = "); // GCOV-NEXT: 11: [[@LINE]]: 11*e69092beSFangrui Song if (result > 400) printf("Overflow!"); // GCOV-NEXT: 11: [[@LINE]]: 12*e69092beSFangrui Song else printf("%lf", result); // GCOV-NEXT: 4: [[@LINE]]: 13*e69092beSFangrui Song } // GCOV-NEXT: -: [[@LINE]]: 14*e69092beSFangrui Song return 0; // GCOV-NEXT: 1: [[@LINE]]: 15*e69092beSFangrui Song } // GCOV-NEXT: -: [[@LINE]]: 16*e69092beSFangrui Song 17*e69092beSFangrui Song // RUN: rm -rf %t && mkdir %t && cd %t 18*e69092beSFangrui Song // RUN: cp %s %p/Inputs/gcov-9.gc* . 19*e69092beSFangrui Song 20*e69092beSFangrui Song // RUN: llvm-cov gcov gcov-9.c | FileCheck %s 21*e69092beSFangrui Song // CHECK: File 'gcov-9.c' 22*e69092beSFangrui Song // CHECK-NEXT: Lines executed:100.00% of 9 23*e69092beSFangrui Song // CHECK-NEXT: Creating 'gcov-9.c.gcov' 24*e69092beSFangrui Song 25*e69092beSFangrui Song // RUN: FileCheck --input-file=%t/gcov-9.c.gcov --check-prefix=HEADER %s 26*e69092beSFangrui Song // RUN: FileCheck --input-file=%t/gcov-9.c.gcov --check-prefix=GCOV %s 27*e69092beSFangrui Song 28*e69092beSFangrui Song // HEADER: {{^}} -: 0:Source:gcov-9.c 29*e69092beSFangrui Song // HEADER-NEXT: -: 0:Graph:gcov-9.gcno 30*e69092beSFangrui Song // HEADER-NEXT: -: 0:Data:gcov-9.gcda 31*e69092beSFangrui Song // HEADER-NEXT: -: 0:Runs:1{{$}} 32*e69092beSFangrui Song // HEADER-NEXT: -: 1:/// Test that llvm-cov 33