This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: darwin bootstrap failure in mainline
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Fariborz Jahanian <fjahanian at apple dot com>
- Cc: gcc List <gcc at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 18 Aug 2004 10:07:47 -0700
- Subject: Re: darwin bootstrap failure in mainline
- References: <470B07B5-F137-11D8-B9A9-000A95BA54A6@apple.com>
On Aug 18, 2004, at 9:54 AM, Fariborz Jahanian wrote:
Mainline bootstrap fails for apple-ppc-darwin today.
../../gcc-mainline-original/gcc/config/darwin-crt2.c: In function
`__darwin_gcc3_preregister_frame_info':
../../gcc-mainline-original/gcc/config/darwin-crt2.c:146: internal
compiler error: RTL flag check: MEM_READONLY_P used with unexpected
rtx code `reg' in machopic_legitimize_pic_address, at
config/darwin.c:617
This was always wrong so here is the simple fix which does fix at least
this problem for me.
I am applying it as obvious after double checking this fixes all of the
problems.
ChangeLog:
* darwin.c (machopic_legitimize_pic_address): Only set MEM_READONLY_P
in the non TARGET_TOC case.
Index: darwin.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/darwin.c,v
retrieving revision 1.78
diff -u -p -r1.78 darwin.c
--- darwin.c 18 Aug 2004 16:22:04 -0000 1.78
+++ darwin.c 18 Aug 2004 17:03:16 -0000
@@ -613,8 +613,8 @@ machopic_legitimize_pic_address (rtx ori
#if !defined (TARGET_TOC)
emit_move_insn (reg, pic_ref);
pic_ref = gen_rtx_MEM (GET_MODE (orig), reg);
-#endif
MEM_READONLY_P (pic_ref) = 1;
+#endif
}
else
{