Subject: port-sun3/2193: [dM] sun3 optimizer rather badly broken
To: None <gnats-bugs@NetBSD.ORG>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: netbsd-bugs
Date: 03/09/1996 13:56:43
>Number:         2193
>Category:       port-sun3
>Synopsis:       [dM] sun3 optimizer rather badly broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar  9 14:20:02 1996
>Last-Modified:
>Originator:     der Mouse
>Organization:
	Dis-
>Release:        -current sup, Feb 27 AM
>Environment:
	Sun-3/110, not that it matters
>Description:
	When trying to build a kernel, I get

cc  -O2 -Werror -msoft-float -I. -I../../../../arch -I../../../.. -DNEWCONFIG -DMACHINE_NONCONTIG -DTIMEZONE="0" -DDST="0" -DGENERIC -DFPU_EMULATE -DHAVECACHE -DSWAPPAGER -DVNODEPAGER -DDEVPAGER -DKTRACE -DDDB -DNFSSERVER -DNFSCLIENT -DFFS -DCD9660 -DFDESC -DFIFO -DKERNFS -DNULLFS -DPROCFS -DUNION -DINET -DNFS_BOOT_RWSIZE="0x400" -DCOMPAT_SUNOS -DCOMPAT_09 -DCOMPAT_10 -DCOMPAT_43 -DTCP_COMPAT_42 -DDIAGNOSTIC -DSCSIDEBUG -D_KERNEL -Dmc68020 -Dsun3  -c ../../../../nfs/nfs_vnops.c
../../../../nfs/nfs_vnops.c: In function `nfsspec_close':
../../../../nfs/nfs_vnops.c:3254: internal error--insn does not satisfy its constraints:
(insn 135 50 52 (set (reg:DI 10 a2)
        (mem/s:DI (plus:SI (reg:SI 11 a3)
                (const_int 168)))) 39 {movdi} (nil)
    (nil))
cc: Internal compiler error: program cc1 got fatal signal 6
*** Error code 1 (continuing)

	(the "continuing" is because I used make -k).  When I copy the
	command and delete the -O2, it completes no problem.

	This is not quite a stock config file - note -DSCSIDEBUG - but
	_nothing_ in the input excuses a bugcheck like this.

	I will be glad to supply the relevant cc -E output on request,
	if it matters.
>How-To-Repeat:
	See Description.
>Fix:
	As a workaround, remove -O2 from sun3/conf/Makefile.sun3, or
	else do as I described above and build nfs_vnops.o by hand with
	no optimization.

					der Mouse

			    mouse@collatz.mcrcim.mcgill.edu
>Audit-Trail:
>Unformatted: