Instrument only selected files (PR gcov-profile/87442).
[official-gcc.git] / gcc / testsuite / gcc.dg / profile-filtering-2.c
blob98bd3aea00f9869f417a71b228788d00a5b6c52d
1 /* { dg-require-profiling "-fprofile-generate" } */
2 /* { dg-options "-O2 -fprofile-generate -fprofile-filter-files=.\*filtering-1.c -fprofile-exclude-files=.\* -fdump-tree-optimized" } */
4 extern void abort (void);
6 int *p1;
7 int *p2;
8 int *p3;
10 int ga = 100;
12 int
13 sub (int i, int j)
15 int k;
16 int l;
17 int m;
18 int n;
19 p1 = &k;
20 p2 = &l;
21 p3 = &m;
22 k = 20;
23 l = 30;
24 m = 40;
25 n = i / j;
26 return n + ga;
29 int
30 main(void)
32 if (sub (99, 33) != 103)
33 abort ();
34 return 0;
37 /* { dg-final { scan-tree-dump-not "PROF_edge" "optimized" } } */