This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Cure a c++ ICE in pa.c


Running the current binutils/ld testsuite for target hppa1.1-linux gives
me an ICE when compiling ld/testsuite/ld-selective/3.cc

cp/decl2.c:output_vtable_inherit
  output_asm_insn (".vtable_inherit %c0, %c1", op);

leads to final.c:output_asm_insn
	    else if (letter == 'c')
	      {
		if (CONSTANT_ADDRESS_P (operands[c]))
		  output_addr_const (asm_out_file, operands[c]);
		else
		  output_operand (operands[c], 'c');
	      }

The hppa CONSTANT_ADDRESS_P is a little weird and rejects a LABEL_REF or
SYMBOL_REF so output_operand is called, and hence
config/pa/pa.c:print_operand.


gcc/ChangeLog
* config/pa/pa.c (print_operand): Handle case 'c' for .vtable_inherit

Alan Modra
-- 
Linuxcare.  Support for the Revolution.

--- /usr/src/egcs/gcc/config/pa/pa.c	Mon Aug  7 23:54:16 2000
+++ gcc/config/pa/pa.c	Sat Sep 30 12:12:23 2000
@@ -4117,6 +4120,11 @@
 	fprintf (file, "%d,%d,%d", op[0], op[1], op[2]);
 	return;
       }
+    case 'c':
+      /* We can get here from a .vtable_inherit due to our
+	 CONSTANT_ADDRESS_P rejecting perfectly good constant
+	 addresses.  */
+      break;
     default:
       abort ();
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]