public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: optimization/3177: Invalid sibcall optimisation on ia64
@ 2002-03-21 18:31 rth
  0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-03-21 18:31 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, rth, schwab

Synopsis: Invalid sibcall optimisation on ia64

Responsible-Changed-From-To: unassigned->rth
Responsible-Changed-By: rth
Responsible-Changed-When: Thu Mar 21 18:31:07 2002
Responsible-Changed-Why:
    .

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3177


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

* optimization/3177: Invalid sibcall optimisation on ia64
@ 2001-06-13 12:26 Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2001-06-13 12:26 UTC (permalink / raw)
  To: gcc-gnats

>Number:         3177
>Category:       optimization
>Synopsis:       Invalid sibcall optimisation on ia64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 13 12:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     =09
>Release:        3.0 20010611 (prerelease)
>Organization:
=09
>Environment:
System: Linux D106 2.4.4-SMP #1 SMP Mon May 14 17:07:47 GMT 2001 ia64 unkno=
wn
Architecture: ia64

host: ia64-suse-linux-gnu
build: ia64-suse-linux-gnu
target: ia64-suse-linux-gnu
configured with: ../configure --enable-threads=3Dposix --enable-long-long -=
-prefix=3D/usr --with-local-prefix=3D/usr/local --infodir=3D/usr/share/info=
 --mandir=3D/usr/share/man --enable-languages=3Dc,c++,f77,objc,java --with-=
gxx-include-dir=3D/usr/include/g++ --enable-nls --with-slibdir=3D/lib --ena=
ble-shared ia64-suse-linux
>Description:
	The sibcall optimisation causes invalid code to be generated.
>How-To-Repeat:
	$ cat sibcall.c
	float g (void *a, void *b, int e, int c, float d)
	{
	  return d;
	}

	float f (void *a, void *b, int c, float d)
	{
	  return g (a, b, 0, c, d);
	}

	int main ()
	{
	  f (0, 0, 1, 1);
	  return 0;
	}
	$ gcc -O2 sibcall.c
	$ ./a.out
	Illegal instruction

	Function f is referencing a stacked register that has never been
	allocated:

		.global f#
		.proc f#
	f:
		.prologue
		.body
		.mii
		// cycle 0
		mov r35 =3D r34
		mov r34 =3D r0
		;;

	The bug does not occur if the type of the last argument of f an g
	are changed to int.
>Fix:
--=20
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanz=E4ckerstr. 10, D-90443 N=FCrnberg
Key fingerprint =3D 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-03-22  2:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-21 18:31 optimization/3177: Invalid sibcall optimisation on ia64 rth
  -- strict thread matches above, loose matches on Subject: below --
2001-06-13 12:26 Andreas Schwab

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).