From 4c8c0deca527fa28fc3c1ef8867f6b9348dda433 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 16 Apr 2002 08:18:47 +0200 Subject: re PR target/6303 (output_operand: invalid expression as operand) PR target/6303 * dwarf2out.c (rtl_for_decl_location): Call ASM_SIMPLIFY_DWARF_ADDR before returning. * config/i386/i386.c (i386_simplify_dwarf_addr): Simplify @GOT only when inside of MEM by eliminating the indirection too. * config/s390/s390.h (ASM_SIMPLIFY_DWARF_ADDR): Define. * config/s390/s390.c (s390_simplify_dwarf_addr): New. * config/s390/s390-protos.h (s390_simplify_dwarf_addr): Add prototype. * gcc.dg/20020415-1.c: New test. From-SVN: r52358 --- gcc/dwarf2out.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 5a00bf4..b7a6d25 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8850,7 +8850,12 @@ rtl_for_decl_location (decl) && (CONSTANT_P (rtl) || (GET_CODE (rtl) == MEM && CONSTANT_P (XEXP (rtl, 0))))) - return rtl; + { +#ifdef ASM_SIMPLIFY_DWARF_ADDR + rtl = ASM_SIMPLIFY_DWARF_ADDR (rtl); +#endif + return rtl; + } rtl = NULL_RTX; } else if (TREE_CODE (decl) == PARM_DECL) @@ -8952,6 +8957,10 @@ rtl_for_decl_location (decl) } } +#ifdef ASM_SIMPLIFY_DWARF_ADDR + if (rtl) + rtl = ASM_SIMPLIFY_DWARF_ADDR (rtl); +#endif return rtl; } -- cgit v1.1