🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Paul Eggert Thu, 05 Nov 1992 04:12
fix for -fpic core dump (GCC 2.3.1, sparc)
#1265
Author: Paul Eggert
Date: Thu, 05 Nov 1992 04:12
35 lines
1620 bytes
gcc 2.3.1 (Sparc, SunOS 4.1.2) with just the -fpic option (or with just the
-fPIC option) dumps core when compiling the following program:

	main() { printf("Hello world\n"); }

The problem is that simplify_subtraction invokes decode_rtx_const on pc_rtx,
and decode_rtx_const doesn't know what to do if GET_CODE yields PC.  Here is a
workaround.


Thu Nov  5 01:53:38 1992  Paul Eggert  (eggert@twinsun.com)

	* varasm.c (simplify_subtraction): Don't invoke decode_rtx_const
	on PC; it won't know what do to with it.


===================================================================
RCS file: varasm.c,v
retrieving revision 2.3
retrieving revision 2.3.1.1
diff -c -r2.3 -r2.3.1.1
*** varasm.c	1992/10/29 22:29:57	2.3
--- varasm.c	1992/11/05 04:01:34	2.3.1.1
***************
*** 2214,2219 ****
--- 2214,2222 ----
  {
    struct rtx_const val0, val1;
  
+   if (XEXP (x, 0) == pc_rtx || XEXP (x, 1) == pc_rtx)
+     return XEXP (x, 0) == XEXP (x, 1) ? const0_rtx : x;
+ 
    decode_rtx_const (GET_MODE (x), XEXP (x, 0), &val0);
    decode_rtx_const (GET_MODE (x), XEXP (x, 1), &val1);
  
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads