From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Henderson To: hjl@lucon.org, mark@codesourcery.com, gcc@gcc.gnu.org, binutils@sourceware.cygnus.com, drepper@cygnus.com Subject: Re: A very "strange" bug in gcc 2.96 Date: Tue, 23 May 2000 10:15:00 -0000 Message-id: <20000523101518.B14564@cygnus.com> References: <20000521115908.A8267@lucon.org> <20000521123156E.mitchell@codesourcery.com> <20000521131938.A8569@lucon.org> <20000521204242.23302.qmail@daffy.airs.com> <20000522210707.864.qmail@daffy.airs.com> <20000522213748.A13526@cygnus.com> <20000523160458.3586.qmail@daffy.airs.com> X-SW-Source: 2000-05/msg00929.html On Tue, May 23, 2000 at 09:04:58AM -0700, Ian Lance Taylor wrote: > Sparc, Alpha, and IA-64 at a minimum adjust the compiler's notion > of the appropriate name binding rules depending on -fpic. > > In what way, other than the recently introduced optimization? I'm > genuinely curious. Symbols that are known to be defined locally are referenced with gp-relative addressing instead of indirectly through the got. This is trivially all static variables, but also includes int i = 0; int j; // if !TREE_COMMON (via -fno-common or c++) On Alpha it also controls whether we fold ldq $27, foo($29) !literal!0 jsr $26, ($27), foo !lituse_jsr!0 ldah $29, 0($26) !gpdisp!1 lda $29, 0($29) !gpdisp!1 to bsr $26, $foo..ng where "$foo..ng" is a special symbol emitted by the compiler in foo after the gp is loaded. r~