[gnu.gcc.bug] GCC on Sequent Balance machines -- reload1.c out of tree space

tale@cs.rpi.edu (David C Lawrence) (01/07/90)

I am having a bit of a problem getting a working GCC 1.36 on our
Sequent Balance 8000 and 21000 machines.  The following seems to be
the only thing (currently) standing in the way of getting it going:

$ make
	cc -c -g  -I. -I. -I./config reload1.c
"reload1.c", line 2249: compiler error: out of tree space; simplify expression
*** Error code 1
Make: .  Stop.
$

I've examined the output of the preprocessor and don't know how to
simplify this expression; even after taking out lots of extraneous
parens and whitespace so I could see the logic more clearly I still
have insufficient knowledge of the compiler internals to make sensible
changes.  Some help (a reload1.s?) would be appreciated so I can get
this going in time for classes starting in about ten days.

The same error happened on both the 8000 and its big brother, the 21000.
The OS is DYNIX 3.0.4.  The expression in question, after macro
expansion, is:

      if (!    (( reload_mode) == DFmode						    ? ((( ((reload_reg_rtx[r])->fld[0].rtint)) & 1) == 0					       && ((target_flags & 1) ? ( ((reload_reg_rtx[r])->fld[0].rtint)) < 16 : ( ((reload_reg_rtx[r])->fld[0].rtint)) < 8))		   : ( reload_mode) == DImode ? (( ((reload_reg_rtx[r])->fld[0].rtint)) & 1) == 0 && ( ((reload_reg_rtx[r])->fld[0].rtint)) < 8	   : 1)
	  || (reload_in[r] != 0
	      && !    (( 				       		((reload_in[r])->mode)) == DFmode						    ? ((( ((reload_reg_rtx[r])->fld[0].rtint)) & 1) == 0					       && ((target_flags & 1) ? ( ((reload_reg_rtx[r])->fld[0].rtint)) < 16 : ( ((reload_reg_rtx[r])->fld[0].rtint)) < 8))		   : (
				       		((reload_in[r])->mode)) == DImode ? (( ((reload_reg_rtx[r])->fld[0].rtint)) & 1) == 0 && ( ((reload_reg_rtx[r])->fld[0].rtint)) < 8	   : 1))
	  || (reload_out[r] != 0
	      && !    (( 				       		((reload_out[r])->mode)) == DFmode						    ? ((( ((reload_reg_rtx[r])->fld[0].rtint)) & 1) == 0					       && ((target_flags & 1) ? ( ((reload_reg_rtx[r])->fld[0].rtint)) < 16 : ( ((reload_reg_rtx[r])->fld[0].rtint)) < 8))		   : (
				       		((reload_out[r])->mode)) == DImode ? (( ((reload_reg_rtx[r])->fld[0].rtint)) & 1) == 0 && ( ((reload_reg_rtx[r])->fld[0].rtint)) < 8	   : 1)))

Dave
-- 
   (setq mail '("tale@cs.rpi.edu" "tale@ai.mit.edu" "tale@rpitsmts.bitnet"))

jim@cs.strath.ac.uk (Jim Reid) (01/11/90)

In article <8YKD^@rpi.edu> tale@cs.rpi.edu (David C Lawrence) writes:
>I am having a bit of a problem getting a working GCC 1.36 on our
>Sequent Balance 8000 and 21000 machines.  The following seems to be
>the only thing (currently) standing in the way of getting it going:
>$ make
>	cc -c -g  -I. -I. -I./config reload1.c
>"reload1.c", line 2249: compiler error: out of tree space; simplify expression
>*** Error code 1

I fixed this some time ago and passed the patch to RMS for inclusion in
a subsequent version of GCC. Here's the patch. Enjoy.

		Jim

*** reload1.c	Wed Nov  8 10:19:44 1989
--- reload1.c.seq	Wed Nov  8 11:31:24 1989
***************
*** 1866,1871 ****
--- 1866,1875 ----
    /* Non-zero means we must reuse spill regs for multiple reloads in this insn
       or we will not have enough spill regs.  */
    int must_reuse = 0;
+ #if defined(sequent) && defined(ns32000) && !defined(__GNUC__)
+   /* kludge for DYNIX C compiler */
+   int h1, h2, h3;
+ #endif
  
    bzero (reload_inherited, MAX_RELOADS);
    bzero (reload_override_in, MAX_RELOADS * sizeof (rtx));
***************
*** 2240,2245 ****
--- 2244,2265 ----
        reload_spill_index[r] = i;
  
        /* Detect when the reload reg can't hold the reload mode.  */
+ #if defined(sequent) && defined(ns32000) && !defined(__GNUC__)
+       /*
+        * The Sequent Balance C compiler cannot grok the
+        * original expression, so simplify it.
+        *   JR 8/11/89 jim@cs.strath.ac.uk
+        */
+       h1 = HARD_REGNO_MODE_OK (REGNO (reload_reg_rtx[r]),
+ 		     reload_mode);
+       h2 = HARD_REGNO_MODE_OK (REGNO (reload_reg_rtx[r]),
+                      GET_MODE (reload_in[r]));
+       h3 = HARD_REGNO_MODE_OK (REGNO (reload_reg_rtx[r]),
+ 		     GET_MODE (reload_out[r]));
+       if (!h1 || (reload_in[r] != 0 && !h2)
+ 	       || (reload_out[r] != 0 && !h3))
+ 
+ #else
        if (! HARD_REGNO_MODE_OK (REGNO (reload_reg_rtx[r]), reload_mode)
  	  || (reload_in[r] != 0
  	      && ! HARD_REGNO_MODE_OK (REGNO (reload_reg_rtx[r]),
***************
*** 2247,2252 ****
--- 2267,2273 ----
  	  || (reload_out[r] != 0
  	      && ! HARD_REGNO_MODE_OK (REGNO (reload_reg_rtx[r]),
  				       GET_MODE (reload_out[r]))))
+ #endif
  	{
  	  if (asm_noperands (PATTERN (insn)) < 0)
  	    /* It's the compiler's fault.  */