| 1 |
/* { dg-additional-sources "target-same-name-1-a.c target-same-name-1-b.c" } */ |
| 2 |
/* PR middle-end/104285 */ |
| 3 |
|
| 4 |
/* Both files create the same static symbol, which caused issues |
| 5 |
in non-host lto1. */ |
| 6 |
|
| 7 |
int one (); |
| 8 |
int two (); |
| 9 |
int one_get_inc2_local_link (); |
| 10 |
int two_get_inc4_local_link (); |
| 11 |
int one_get_inc3_link_a (); |
| 12 |
int two_get_inc5_link_a (); |
| 13 |
|
| 14 |
int |
| 15 |
main () |
| 16 |
{ |
| 17 |
if (one () != 5) |
| 18 |
__builtin_abort (); |
| 19 |
if (two () != 7) |
| 20 |
__builtin_abort (); |
| 21 |
|
| 22 |
if (one_get_inc2_local_link () != 42) |
| 23 |
__builtin_abort (); |
| 24 |
if (two_get_inc4_local_link () != 55) |
| 25 |
__builtin_abort (); |
| 26 |
if (one_get_inc2_local_link () != 42+2) |
| 27 |
__builtin_abort (); |
| 28 |
if (two_get_inc4_local_link () != 55+4) |
| 29 |
__builtin_abort (); |
| 30 |
|
| 31 |
if (one_get_inc3_link_a () != 123) |
| 32 |
__builtin_abort (); |
| 33 |
if (two_get_inc5_link_a () != 123+3) |
| 34 |
__builtin_abort (); |
| 35 |
|
| 36 |
/* FIXME: The last call did not increment the global var. */ |
| 37 |
/* PR middle-end/105015 */ |
| 38 |
#if 0 |
| 39 |
if (one_get_inc3_link_a () != 123+3+5) |
| 40 |
__builtin_abort (); |
| 41 |
if (two_get_inc5_link_a () != 123+3+5+3) |
| 42 |
__builtin_abort (); |
| 43 |
#endif |
| 44 |
|
| 45 |
return 0; |
| 46 |
} |