output unreferenced static variable if an alias to it is referenced

Richard Guenther richard.guenther@gmail.com
Thu Oct 20 11:29:00 GMT 2005


On 10/20/05, Alexandre Oliva <aoliva@redhat.com> wrote:
> The bug in this patch was uncovered as part of the weakref
> development.
>
> If we define a static variable and an alias to it, and use the alias
> but not the variable, we fail to output the static variable.  I'd
> expected the assembler to reject such output, but it accepts it, and
> we end up with a relocation to an undefined symbol where the
> locally-defined symbol was expected.
>
> This is a regression from GCC 4.0.  Tested on amd64-linux-gnu.  Ok to
> install?

This sounds like PR24295?  If so, please state this in the ChangeLog.

Thanks,
Richard.

> :ADDPATCH attr-alias:
>
>
>
>
> --
> Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
> Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
> Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}
>
>
>
>



More information about the Gcc-patches mailing list