diff mbox series

rs6000: Handle print_operand_address for unexpected RTL (PR87598)

Message ID 38749009464c9deb459562622650086789f2898d.1540216416.git.segher@kernel.crashing.org
State New
Headers show
Series rs6000: Handle print_operand_address for unexpected RTL (PR87598) | expand

Commit Message

Segher Boessenkool Oct. 22, 2018, 2 p.m. UTC
As the PR shows, the user can force this to be called on at least some
RTL that is not a valid address.  Most targets treat this as if the
user knows best; let's do the same.

Committing to trunk.


Segher


2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/87598
	* config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
	call output_addr_const and hope for the best.

---
 gcc/config/rs6000/rs6000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index b7da571..db82c67 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -21255,7 +21255,7 @@  print_operand_address (FILE *file, rtx x)
 	fprintf (file, "(%s)", reg_names[REGNO (XVECEXP (tocrel_base_oac, 0, 1))]);
     }
   else
-    gcc_unreachable ();
+    output_addr_const (file, x);
 }
 
 /* Implement TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA.  */