From 2b1b6bf903b908e98ea861317289a3c15e0bd0df Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Wed, 4 Jul 2001 14:20:21 -0400 Subject: [PATCH] emit-rtl.c (change_address): Don't abort if invalid address while reload is in progress. * emit-rtl.c (change_address): Don't abort if invalid address while reload is in progress. From-SVN: r43765 --- gcc/ChangeLog | 11 +++++++++-- gcc/emit-rtl.c | 10 +++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9283fa1badb..de559fb5320 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Wed Jul 4 13:40:02 2001 Richard Kenner + + * emit-rtl.c (change_address): Don't abort if invalid address while + reload is in progress. + 2001-07-04 Daniel Berlin * c-lex.c (cb_file_change): Pass line number to @@ -14,14 +19,16 @@ * toplev.h (debug_start_source_file): Add line number to parameters. - * dwarf2out.h (dwarf2out_start_source_file): Add line number to parameters. + * dwarf2out.h (dwarf2out_start_source_file): Add line number to + parameters. * dwarf2out.c (dwarf2out_start_source_file): Add line number to parameters. Output debug_macinfo data for starting file if requested. (dwarf2out_end_source_file): Output debug_macinfo data for ending file if requested. - (dwarf2out_define): Output debug_macinfo data for defining a macro if requested. + (dwarf2out_define): Output debug_macinfo data for defining a macro + if requested. (dwarf2out_undef): Output debug_macinfo data for undefining a macro if requested. (DEBUG_MACINFO_SECTION): New. DWARF2 macro info section name. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index deca99b7459..107e75d4cd0 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1584,9 +1584,13 @@ change_address (memref, mode, addr) if (addr == 0) addr = XEXP (memref, 0); - /* If reload is in progress or has completed, ADDR must be valid. - Otherwise, we can call memory_address to make it valid. */ - if (reload_completed || reload_in_progress) + /* If reload is in progress, don't check for validity of the address since we + assume the caller knows what they are doing. If reload has completed, the + address must be valid. Otherwise, we call memory_address to make it + valid. */ + if (reload_in_progress) + ; + else if (reload_completed) { if (! memory_address_p (mode, addr)) abort ();