This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PowerPC64] Fix gcc.dg/debug/20050907-1.c failures
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 13 Sep 2005 23:58:20 +0930
- Subject: [PowerPC64] Fix gcc.dg/debug/20050907-1.c failures
Works around the bug exposed by gcc.dg/debug/20050907-1.c failures.
I didn't think it worth changing dbxout.c to fix this bug properly,
since I think powerpc64 is the only target to break the dbxout_block
assumption that referring to the function name at assembly level gives
the start of the function code.
* config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Treat function name
passed as NAME as if it were label at start of function code.
Bootstrapped and regression tested powerpc64-linux. OK for mainline and
4.0?
Index: gcc/config/rs6000/linux64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/linux64.h,v
retrieving revision 1.82
diff -u -p -r1.82 linux64.h
--- gcc/config/rs6000/linux64.h 13 Jul 2005 16:28:17 -0000 1.82
+++ gcc/config/rs6000/linux64.h 13 Sep 2005 11:29:16 -0000
@@ -494,10 +503,19 @@ while (0)
{ \
const char *s; \
dbxout_begin_stabn (BRAC); \
- assemble_name (FILE, NAME); \
- putc ('-', FILE); \
s = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0); \
- rs6000_output_function_entry (FILE, s); \
+ /* dbxout_block passes this macro the function name as NAME, \
+ assuming that it is the function code start label. In our \
+ case, the function name is the OPD entry. dbxout_block is \
+ broken, hack around it here. */ \
+ if (NAME == s) \
+ putc ('0', FILE); \
+ else \
+ { \
+ assemble_name (FILE, NAME); \
+ putc ('-', FILE); \
+ rs6000_output_function_entry (FILE, s); \
+ } \
putc ('\n', FILE); \
} \
while (0)
--
Alan Modra
IBM OzLabs - Linux Technology Centre