This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] fix compiling gcc in SPEC CPU 2000 on darwin with -finline-functions and -funit-at-a-time


When compiling the following testcase (derived from gcc in SPEC CPU 2000) on powerpc-apple-darwin,
the stub for simple_cst_equal is not defined at all. To fix the stub either has be to defined or the reference to the stub has to be changed to the non-stub version, having the stub be defined is easier
for now and works for this testcase and also the full gcc source in SPEC.


Ok?

Thanks,
Andrew Pinski

ChangeLog:

* config/darwin.c (machopic_output_possible_stub_label): Allow stub symbol
be not defined when outputting possible stub label.


Patch:

Index: darwin.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/darwin.c,v
retrieving revision 1.53
diff -u -p -r1.53 darwin.c
--- darwin.c	16 Oct 2003 01:16:38 -0000	1.53
+++ darwin.c	5 Nov 2003 22:53:21 -0000
@@ -1115,7 +1115,7 @@ machopic_output_possible_stub_label (FIL
       const char *sym_name;

sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
- if (sym_name[0] == '!' && sym_name[1] == 'T'
+ if (sym_name[0] == '!' && (sym_name[1] == 'T' || sym_name[1] == 't')
&& ! strcmp (name+2, sym_name+2))
{
ASM_OUTPUT_LABEL (file, IDENTIFIER_POINTER (TREE_PURPOSE (temp)));



Attachment: temp.fix.gcc.diff.txt
Description: Text document




Testcase:


int
attribute_list_contained ()
{
  return (simple_cst_equal ());
}
int
simple_cst_list_equal ()
{
  return (simple_cst_equal ());
}

int __attribute__((noinline))
simple_cst_equal ()
{
  return simple_cst_list_equal ();
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]