------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca 2005-11-14 19:40 ------- Subject: Re: FAIL: gcc.dg/attr-weakref-1.c
> Does this target actually support weak declarations? It appears to me that it > only does when the assembler supports .weak, but even then, the linker will > object to undefined weak symbols, which is something this test relies on. I > suppose we'd have to mark it as an XFAIL on hpux, or use some alternate > dg-require to indicate we need the ability to refer to undefined weak symbols. See PR 23387. The HP linkers and dynamic loaders don't like undefined weak symbols. GAS provides support for ".weak" using SOM secondary definition symbols on the 32-bit port. We use this under HP-UX 11 and it is good enough for most purposes. However, the semantics differ from that defined in the sysv ABI. The 64-bit support is a little better supported by the linker, but the dynamic linker still doesn't like undefined weak symbols. We don't support ".weak' under HP-UX 10 due to linker bugs. Either XFAIL or dg-require would be ok. If more tests are likely to be added, maybe dg-require would be better. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24827