[committed] VAX: Correct a typo in PIC symbolic addition operand checks

Maciej W. Rozycki macro@linux-mips.org
Sun Nov 15 17:43:55 GMT 2020

Fix a typo and check both SImode addition operands for being incorrectly 
symbolic in PIC mode before issuing a diagnostic dump of the offending 
RTL expression.

	* config/vax/vax.c (vax_output_int_add) <E_SImode>: Also check
	`operands[2]' for being symbolic with PIC rather than checking
	`operands[1]' twice.

 No regressions in `vax-netbsdelf' testing; this diagnostic dump is not 
supposed to trigger.  Committed as obvious.

 gcc/config/vax/vax.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: gcc/gcc/config/vax/vax.c
--- gcc.orig/gcc/config/vax/vax.c
+++ gcc/gcc/config/vax/vax.c
@@ -1511,7 +1511,7 @@ vax_output_int_add (rtx_insn *insn, rtx
       if (flag_pic
 	  && (symbolic_operand (operands[1], SImode)
-	      || symbolic_operand (operands[1], SImode)))
+	      || symbolic_operand (operands[2], SImode)))
 	debug_rtx (insn);
       return "addl3 %1,%2,%0";

More information about the Gcc-patches mailing list