[PATCH] fix compiling gcc in SPEC CPU 2000 on darwin with -finline-functions and -funit-at-a-time
Fariborz Jahanian
fjahanian@apple.com
Thu Nov 6 18:05:00 GMT 2003
This patch is not right. It eliminates the symptom of the bug by
inserting an extra label. Bug is in the middle-end. In this
special case, function called in the inlined version of of LIST() has
its 'static' flag set. I am looking at this bug now.
- Fariborz
On Wednesday, November 5, 2003, at 03:10 PM, Andrew Pinski wrote:
> 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)));
>
>
> <temp.fix.gcc.diff.txt>
>
>
> 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 ();
> }
More information about the Gcc-patches
mailing list