MIPS C++ bug

Richard Sandiford rsandifo@redhat.com
Wed Jun 18 09:41:00 GMT 2003

<gp@qnx.com> writes:
> All other targets I could test allow it, and sometimes mips allows it.  
> Looked at that way, it does seem like the mips optimizations are out of line.

I think the same problem would occur on any target which uses the
ASM_OUTPUT_EXTERNAL macro for variables.  (grep suggests ARM AOF,
m68hc11...)  To fix it, we'd need to stop applying the macro to
variables that are never used.

In other words, I think it would be the same as making sure that
foobar is never referenced in the output for:

    extern int foobar;
    int f () { if (0) return foobar; else return 1; }

Not sure how easy that would be to do. ;)

There shouldn't be any need to keep the .externs when using
explicit relocs, though.


More information about the Gcc mailing list