| 1 |
// { dg-do compile } |
| 2 |
// { dg-require-profiling "-fprofile-generate" } |
| 3 |
// { dg-options "-fprofile-generate" } |
| 4 |
|
| 5 |
typedef __SIZE_TYPE__ size_t; |
| 6 |
|
| 7 |
extern "C" |
| 8 |
{ |
| 9 |
extern void *memcpy (void *__dest, __const void *__src, size_t __n); |
| 10 |
} |
| 11 |
|
| 12 |
extern char *src, *sources; |
| 13 |
extern int n_sources; |
| 14 |
|
| 15 |
static void |
| 16 |
find_source (const char *file_name) |
| 17 |
{ |
| 18 |
memcpy (src, sources, n_sources * sizeof (*sources)); |
| 19 |
} |
| 20 |
|
| 21 |
extern const char *gcov_read_string (void); |
| 22 |
|
| 23 |
static void read_graph_file (void) |
| 24 |
{ |
| 25 |
find_source (gcov_read_string ()); |
| 26 |
} |
| 27 |
|
| 28 |
static void process_file (void) |
| 29 |
{ |
| 30 |
read_graph_file (); |
| 31 |
} |
| 32 |
|
| 33 |
int main () |
| 34 |
{ |
| 35 |
process_file (); |
| 36 |
} |