Browse Source
We need to set non_ir_ref_regular on the source for assignment to get the correct LTO resolution: 190 a27be7f4ad90c5ce PREVAILING_DEF real_g instead of 190 30c3b2d8f967f5ea PREVAILING_DEF_IRONLY real_g PR ld/26163 * ldexp.c (exp_fold_tree_1): Set non_ir_ref_regular on the source for assignment. * testsuite/ld-plugin/lto.exp: Run ld/26163 test. * testsuite/ld-plugin/pr26163a.c: New file. * testsuite/ld-plugin/pr26163b.c: Likewise.binutils-2_35-branch
5 changed files with 52 additions and 3 deletions
@ -0,0 +1,9 @@ |
|||
extern int counter; |
|||
|
|||
extern void g(void); |
|||
|
|||
void f(void) |
|||
{ |
|||
g(); |
|||
counter++; |
|||
} |
|||
@ -0,0 +1,19 @@ |
|||
#include <stdio.h> |
|||
|
|||
int counter; |
|||
extern void f(void); |
|||
|
|||
void |
|||
real_g(void) |
|||
{ |
|||
counter++; |
|||
} |
|||
|
|||
int main() |
|||
{ |
|||
real_g(); |
|||
f(); |
|||
if (counter == 3) |
|||
printf ("PASS\n"); |
|||
return 0; |
|||
} |
|||
Loading…
Reference in new issue