This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/533: -fPIC prevents compilation of file



>Number:         533
>Category:       c
>Synopsis:       -fPIC prevents compilation of file
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 13 10:46:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Steve Muir
>Release:        gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
>Organization:
>Environment:
RedHat 6.1/Linux 2.2.16-3
>Description:
When compiling a function to make a system call using the
standard Linux macros, the use of the -fPIC flag causes the
compiler to emit the following error message:

test-pic.c: In function `foo':
test-pic.c:7: fixed or forbidden register 3 (bx) was spilled for class BREG.
This may be due to a compiler bug or to impossible asm
statements or clauses.

Since the same function compiles just fine when -fPIC is
not used, thus implying this is not due to "impossible asm
statements or clauses", I assume this is a compiler bug.
>How-To-Repeat:
gcc -c test-pic.i vs. gcc -c -fPIC test-pic.i
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test-pic.i"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test-pic.i"

IyAxICJ0ZXN0LXBpYy5jIgojIDEgIi91c3IvaW5jbHVkZS9hc20vdW5pc3RkLmgiIDEgMwoKCgog
CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoK
CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoK
CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoK
CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgogCgoKCgoKCgogCgoKCgoKCgoKCgogCgojIDIyNyAiL3Vz
ci9pbmNsdWRlL2FzbS91bmlzdGQuaCIgMwoKCiMgMjM3ICIvdXNyL2luY2x1ZGUvYXNtL3VuaXN0
ZC5oIiAzCgoKIyAyNDcgIi91c3IvaW5jbHVkZS9hc20vdW5pc3RkLmgiIDMKCgojIDI1OCAiL3Vz
ci9pbmNsdWRlL2FzbS91bmlzdGQuaCIgMwoKCiMgMjY5ICIvdXNyL2luY2x1ZGUvYXNtL3VuaXN0
ZC5oIiAzCgoKIyAyODEgIi91c3IvaW5jbHVkZS9hc20vdW5pc3RkLmgiIDMKCgojIDI5NCAiL3Vz
ci9pbmNsdWRlL2FzbS91bmlzdGQuaCIgMwoKIyAzMzAgIi91c3IvaW5jbHVkZS9hc20vdW5pc3Rk
LmgiIDMKCgoKIyAxICJ0ZXN0LXBpYy5jIiAyCgoKZXh0ZXJuIGludCBlcnJubzsKCgpzdGF0aWMK
IGludCAgICBmb28gKCAgaW50ICAgIHggKSB7IGxvbmcgX19yZXM7IF9fYXNtX18gdm9sYXRpbGUg
KCJpbnQgJDB4ODAiIDogIj1hIiAoX19yZXMpIDogIjAiICgwICApLCJiIiAoKGxvbmcpKCAgeCAp
KSk7IGRvIHsgaWYgKCh1bnNpZ25lZCBsb25nKSggX19yZXMgKSA+PSAodW5zaWduZWQgbG9uZyko
LTEyNSkpIHsgZXJybm8gPSAtKCBfX3JlcyApOyAgX19yZXMgID0gLTE7IH0gcmV0dXJuICggIGlu
dCAgKSAoIF9fcmVzICk7IH0gd2hpbGUgKDApIDsgfSAKCnZvaWQKYmFyKHZvaWQpCiAgewogIGZv
bygwKTsKICB9Cg==

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]