public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* vfork/SPARC problem.
@ 1999-07-15  2:14 Casper Dik
  0 siblings, 0 replies; 2+ messages in thread
From: Casper Dik @ 1999-07-15  2:14 UTC (permalink / raw)
  To: egcs-bugs

I noticed in egcs 2.95 (and as early as I have them, really), that
the 'working vfork" tests fails when you pass "CFLAGS=-O2".

	$ gcc -O vfork.c
	$ ./a.out
	$ gcc -O2 vfork.c
	$ ./a.out
	Segmentation fault
	$ gcc -v

Reading specs from /usr/local/gnu/lib/gcc-lib/sparc-sun-solaris2/2.95/specs
gcc version 2.95 19990712 (prerelease)

This works for gcc 2.8.1

Attached are: vfork.c (a test programma from configure modified to
compile w/o confdefs.
	vfork-O1.s: 	working vfork
	vfork-O2.s: 	failing vfork.

Diffs show:

        nop
        call    vfork, 0
!        nop
!       sethi   %hi(child.3), %o1
        cmp     %o0, 0

----
        nop
        call    vfork, 0
!       sethi   %hi(child.3), %l0
        cmp     %o0, 0
        bge     .LL4

So the broken code drops the nop in the delay slot
and that causes the %l0 register to be clobbered in the
child and %hi(child.3) to be lost when the parent resumes.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vfork/SPARC problem.
@ 1999-07-31 23:33 Casper Dik
  0 siblings, 0 replies; 2+ messages in thread
From: Casper Dik @ 1999-07-31 23:33 UTC (permalink / raw)
  To: egcs-bugs

The vfork() problem on SPARC (vfork causes core dumps on -O2 and better)
appears to be limited to the HAIFA scheduler.

Casper


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-07-31 23:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-15  2:14 vfork/SPARC problem Casper Dik
1999-07-31 23:33 Casper Dik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).