Hi, alias-1 and alias-2 fails with -fno-use-inliner-plugin because the inlinig it relies on does not happen. This is because w/o resolution info we can not optimize away the offline copy and we know that main is executed once and optimize for size.
Bootsrapped/regtested x86_64-linux, comitted. Honza Index: ChangeLog =================================================================== --- ChangeLog (revision 272846) +++ ChangeLog (working copy) @@ -1,3 +1,11 @@ +2019-07-01 Jan Hubicka <hubi...@ucw.cz> + + PR lto/91028 + PR lto/90720 + * g++.dg/lto/alias-1_0.C: Add loop to make inlining happen with + -fno-use-linker-plugin + * g++.dg/lto/alias-2_0.C: Likewise. + 2019-07-01 Dominique d'Humieres <domi...@gcc.gnu.org> * g++.dg/cpp0x/gen-attrs-67.C: Add error for darwin. Index: g++.dg/lto/alias-1_0.C =================================================================== --- g++.dg/lto/alias-1_0.C (revision 272846) +++ g++.dg/lto/alias-1_0.C (working copy) @@ -17,6 +17,7 @@ __attribute__ ((used)) struct b **bptr = (struct b**)&aptr; extern void init (); extern void inline_me_late (int); +int n=1; int @@ -24,7 +25,8 @@ main (int argc, char **argv) { init (); aptr = 0; - inline_me_late (argc); + for (int i=0; i<n; i++) + inline_me_late (argc); if (!__builtin_constant_p (aptr == 0)) __builtin_abort (); return (size_t)aptr; Index: g++.dg/lto/alias-2_0.C =================================================================== --- g++.dg/lto/alias-2_0.C (revision 272846) +++ g++.dg/lto/alias-2_0.C (working copy) @@ -17,6 +17,7 @@ __attribute__ ((used)) struct b **bptr = (struct b**)&aptr; extern void init (); extern void inline_me_late (int); +int n=1; int @@ -24,7 +25,8 @@ main (int argc, char **argv) { init (); aptr = 0; - inline_me_late (argc); + for (int i=0; i<n; i++) + inline_me_late (argc); if (!__builtin_constant_p (aptr == 0)) __builtin_abort (); return (size_t)aptr;