https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68771

--- Comment #12 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Daniel Vollmer from comment #10)
> Created attachment 46036 [details]
> Example triggering "This was likely caused by different translation units
> being compiled with different visibility settings."
> 
> Generates (w/ g++-7.4 on Darwin)
> 
> ld: warning: direct access in function '__GLOBAL__sub_I_65535_0_test.cpp'
> from file
> '/var/folders/02/yl3m8d4d0397mk6dxn6dpcqw0000gp/T//ccuYv6qu.ltrans0.ltrans.
> o' to global weak symbol '__ZGVZ19BroadcastFromMasterImEvPT_mE4bufs' from
> file
> '/var/folders/02/yl3m8d4d0397mk6dxn6dpcqw0000gp/T//ccuYv6qu.ltrans0.ltrans.
> o' means the weak symbol cannot be overridden at runtime. This was likely
> caused by different translation units being compiled with different
> visibility settings.

Thanks, I can reproduce this with my local gcc-7 branch, 
interesting that it needs both -Ofast and -fprofile-generate to fire.

Reply via email to