public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de> To: gcc-gnats@gcc.gnu.org Subject: optimization/3177: Invalid sibcall optimisation on ia64 Date: Wed, 13 Jun 2001 12:26:00 -0000 [thread overview] Message-ID: <je1yooi3p4.fsf@sykes.suse.de> (raw) >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:
next reply other threads:[~2001-06-13 12:26 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-06-13 12:26 Andreas Schwab [this message] 2002-03-21 18:31 rth
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=je1yooi3p4.fsf@sykes.suse.de \ --to=schwab@suse.de \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).