The fix is:
Index: i386.c
===================================================================
--- i386.c (revision 109602)
+++ i386.c (working copy)
@@ -6680,6 +6682,8 @@ output_pic_addr_const (FILE *file, rtx x
break;
case SYMBOL_REF:
+ if (SYMBOL_REF_DECL (x))
+ mark_decl_referenced (SYMBOL_REF_DECL (x));
assemble_name (file, XSTR (x, 0));
if (!TARGET_MACHO && code == 'P' && ! SYMBOL_REF_LOCAL_P (x))
fputs ("@PLT", file);
---------
But I cannot test it at all
--
Summary: gcc.c-torture/compile/20030921-1.c fails at -O0
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: assemble-failure
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: i686-apple-darwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25758