This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
BUG (egcs-2.90.27): -fPIC and _syscallX ()
- To: egcs-bugs at cygnus dot com
- Subject: BUG (egcs-2.90.27): -fPIC and _syscallX ()
- From: Martin Baulig <norwegen at home-of-linux dot org>
- Date: Sat, 13 Jun 1998 21:25:29 +0200 (CEST)
- Reply-To: Martin Baulig <baulig at castor dot uni-trier dot de>
-----BEGIN PGP SIGNED MESSAGE-----
I have
egcs-2.90.27 980315 (egcs-1.0.2 release)
Linux voyager 2.0.32 #32 Sat Jun 13 19:52:48 CEST 1998 i686
glibc-2.0.7-5
The following error occurs every time you try to compile a
function that uses _syscallX () with -fPIC; here's some sample
program than can reproduce the bug:
#include <linux/unistd.h>
#include <syscall.h>
static inline _syscall1 (void, exit, int, code);
int
main (void)
{
exit (0);
}
Compile this with
$ gcc -o test -fPIC test.c
and you will get
norwegen:~/bug - 2654 > gcc -o test -fPIC test.c
test.c:5: warning: `exit' was declared `extern' and later
`static'
test.c: In function `exit':
test.c:5: warning: `return' with a value, in function returning
void
test.c:12: fixed or forbidden register was spilled.
This may be due to a compiler bug or to impossible asm
statements or clauses.
The problem does not occur when you compile without '-fPIC'.
Martin
- ----------------------------------------------------------------
Martin Baulig - Angewandte Mathematik - Universitaet Trier
baulig@castor.uni-trier.de, http://www.home-of-linux.com/
Key: 1024-bit key with ID C8178435 created 1997/01/24
ID: 67 C1 84 A0 47 F5 11 C5 5F 68 4C 84 99 05 C3 92
Finger baulig@math38 or fetch mykey.asc from the url above
- -----------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
iQEVAwUBNYLSMb1qLpmpm+NRAQGzegf+MgYJRTUfqm94lTLghCFDzv3X5wF4nByY
lLkrT8/QQ/CHXBl3VOCCw12wB79u2nwFZJM1y97Vanyq+osg3riiFNYlsmhvMw21
k9zs243jouRpQbQpMp0r/J0JN8U4RhUwq4ObjuH5M75aQbjB/NiF6+rDf+KNqY3E
TQnRdULXgBvpGl0jYx5zNcEPglySTa3QDwvB1f0WgSFlcamyjVRWz8tmzqzjCHSP
dWQd41o0MPcP8hWRNgt28aHxPTgJbTujkoT7OSfacZZVyHDOZDu4nSiXw4RGV2oD
NM+YUlgA9Jw2mRrLiB3jvT7Ib6sFtHx94Ue36vHKTl1Ho9W2NmFe4g==
=eskD
-----END PGP SIGNATURE-----