[gnu.gcc.bug] GCC 1.28 and HP-UX 6.2

manson@TUT.CIS.OHIO-STATE.EDU (Bob Manson) (09/21/88)

I'm having trouble getting GCC 1.28 to compile under HP-UX 6.2 (running on
an HP 9000/330). I can make the first stage OK, but when I try to
compile gcc again using the stage1 gcc, it hangs in an infinite loop
trying to compile c-parse.tab.c. I can't include any other useful info because
gcc doesn't generate debug info that our debugger likes....by the way,
GCC 1.27 compiled without a hitch.

By the way, for 6.2 you need to add a -Wc,-Np300 to the CFLAGS in the Makefile.
Also, there is a cast that needs to be done in expr.c, line 1610:

      return store_field (to_rtx, bitsize, bitpos, mode1, from,
			  want_value ? (enum machine_mode)TYPE_MODE (TREE_TYPE (to)) :   VOIDmode,
			  unsignedp);

The (enum machine_mode) before TYPE_MODE.... needs to be added. The HP C
compiler seems to have troubles with enumerated data types in various
situations but I've never bothered to isolate the cause (lots of warnings
about the gcc code). In this case, the "differing types" occured across the
: operator, so it was a fatal error.

Wish I could be more helpful about the hanging problem....

							Thanks,
							 Bob
manson@tut.cis.ohio-state.edu

bob@allosaur.cis.ohio-state.edu (Bob Sutterfield) (09/21/88)

Are you using the current bison?
-=-
Zippy sez,								--Bob
Isn't this my STOP?!

glenne%hplsla@HPLABS.HP.COM (Glenn Engel) (09/21/88)

>
>I'm having trouble getting GCC 1.28 to compile under HP-UX 6.2 (running on
>an HP 9000/330). I can make the first stage OK, but when I try to
>compile gcc again using the stage1 gcc, it hangs in an infinite loop
>trying to compile c-parse.tab.c. I can't include any other useful info because
>gcc doesn't generate debug info that our debugger likes....by the way,
>GCC 1.27 compiled without a hitch.

I had similar problems but with the patch to reload.c suggested by 
Donn Seeley    University of Utah CS Dept    donn@cs.utah.edu I was
able to build and verify stage2.

Good Luck,

glenne%hplsla@hplabs.hp.com

Here's the patch I used:


*** ../../dist/gcc-1.28/reload.c	Mon Sep 12 21:11:55 1988
--- reload.c	Tue Sep 20 22:33:12 1988
***************
*** 249,255
  	  || GET_CODE (XEXP (in, 0)) == PRE_DEC)
  	out = gen_rtx (MEM, GET_MODE (out), XEXP (XEXP (out, 0), 0));
      }
! 
    /* If we are reloading a (SUBREG (MEM ...) ...) or (SUBREG constant ...),
       really reload just the inside expression in its own mode.
       Note that the case of (SUBREG (CONST_INT...)...) is handled elsewhere;

--- 249,255 -----
  	  || GET_CODE (XEXP (in, 0)) == PRE_DEC)
  	out = gen_rtx (MEM, GET_MODE (out), XEXP (XEXP (out, 0), 0));
      }
! #if 0
    /* If we are reloading a (SUBREG (MEM ...) ...) or (SUBREG constant ...),
       really reload just the inside expression in its own mode.
       Note that the case of (SUBREG (CONST_INT...)...) is handled elsewhere;
***************
*** 266,271
  	  abort ();
        inmode = GET_MODE (in);
      }
  
    /* If IN appears in OUT, we can't share any input-only reload for IN.  */
    if (in != 0 && out != 0 && reg_mentioned_p (in, out))

--- 266,272 -----
  	  abort ();
        inmode = GET_MODE (in);
      }
+ #endif
  
    /* If IN appears in OUT, we can't share any input-only reload for IN.  */
    if (in != 0 && out != 0 && reg_mentioned_p (in, out))