public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: hv@crypt0.demon.co.uk
To: gcc-gnats@gcc.gnu.org
Cc: perl5-porters@perl.org
Subject: c/3685: gcc-2.96 fails with -O3 on perl-5.7.2
Date: Fri, 13 Jul 2001 21:16:00 -0000	[thread overview]
Message-ID: <20010714040817.1238.qmail@sourceware.cygnus.com> (raw)

>Number:         3685
>Category:       c
>Synopsis:       gcc-2.96 fails with -O3 on perl-5.7.2
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 13 21:16:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Hugo van der Sanden
>Release:        gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
>Organization:
>Environment:

>Description:
Repeatable below is derived from an attempt to compile perl-5.7.2 on a (fundamentally) stock RedHat 7.1 system using:
  ./Configure -des -Dprefix=/opt/perl-5.7.2.64bit -Doptimize='-g -O3' -Dusedevel -Uversiononly -Duse64bitint && make test

Problem does not occur if -O3 is replaced with -O2. Error shown is:
zz.i: In function `PerlIORaw_pushed':
zz.i:38: Unrecognizable insn:
(insn/i 83 82 85 (set (reg:SI 64)
        (mem/s:SI (plus:SI (mult:SI (subreg:SI (reg:DI 55) 0)
                    (const_int 4 [0x4]))
                (reg:SI 62)) 8)) -1 (insn_list 82 (nil))
    (expr_list:REG_DEAD (reg:DI 55)
        (expr_list:REG_DEAD (reg:SI 62)
            (nil))))
zz.i:38: confused by earlier errors, bailing out

Since many users of gcc-2.96 will attempt to compile perl, it would be useful to have a workaround for this problem. When compiling perl-5.7.2 on a stock RedHat-7.1 using this invocation:
  ./Configure -des -Dprefix=/opt/perl-5.7.2.64bit -Doptimize='-g -O3' -Dusedevel -Uversiononly -Duse64bitint && make test
.. I see this:
  `sh  cflags libperl.a perlio.o`  perlio.c
          CCCMD =  cc -DPERL_CORE -c -Wall -DDEBUGGING -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O3 
perlio.c: In function `PerlIORaw_pushed':
perlio.c:905: Unrecognizable insn:
(insn/i 248 247 249 (set (reg:SI 85)
        (mem/s:SI (plus:SI (mult:SI (subreg:SI (reg:DI 78) 0)
                    (const_int 8 [0x8]))
                (reg:SI 84)) 0)) -1 (insn_list 247 (nil))
    (expr_list:REG_DEAD (reg:SI 84)
        (nil)))
perlio.c:905: confused by earlier errors, bailing out
make: *** [perlio.o] Error 1

Not yet tested with gcc 3.xx.
>How-To-Repeat:
Save the attachment as zz.i; invoke: gcc -o perlio.o -c -g -O3 zz.i
>Fix:
Unknown
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="zz.i"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="zz.i"

c3RydWN0IFBlcmxJT19wYWlyX3QgeyB2b2lkICpmdW5jczsgfTsKc3RydWN0IF9QZXJsSU87CnN0
cnVjdCBfUGVybElPIHsgc3RydWN0IF9QZXJsSU8gKiBuZXh0OyB9OwpzdHJ1Y3QgUGVybElPX2xp
c3RfdCB7IHN0cnVjdCBQZXJsSU9fcGFpcl90ICphcnJheTsgfTsKZXh0ZXJuIHZvaWQgUGVybElP
X3N0ZGlvOwpzdHJ1Y3QgUGVybElPX2xpc3RfdCAqIFBlcmxJT19kZWZhdWx0X2xheWVycyh2b2lk
KTsKCnZvaWQgKgpQZXJsSU9fbGF5ZXJfZmV0Y2goIHN0cnVjdCBQZXJsSU9fbGlzdF90ICphdixs
b25nIGxvbmcgbix2b2lkICpkZWYpCnsKICAgIGlmIChuID49IDAgJiYgbiA8ICoobG9uZyBsb25n
ICopMCkKCXJldHVybiBhdi0+YXJyYXlbbl0uZnVuY3M7CiAgICBpZiAoIWRlZikKCVBlcmxfY3Jv
YWsoInBhbmljOiBQZXJsSU8gbGF5ZXIgYXJyYXkgY29ycnVwdCIpOwogICAgcmV0dXJuIGRlZjsK
fQoKdm9pZCAqClBlcmxJT19kZWZhdWx0X2xheWVyKCBsb25nIG4pCnsKICAgIHN0cnVjdCBQZXJs
SU9fbGlzdF90ICphdiA9IFBlcmxJT19kZWZhdWx0X2xheWVycygpOwogICAgaWYgKG4gPCAwKQoJ
biArPSAqKGxvbmcgbG9uZyAqKTA7CiAgICByZXR1cm4gUGVybElPX2xheWVyX2ZldGNoKGF2LCBu
LCAmUGVybElPX3N0ZGlvKTsKfQoKbG9uZyBsb25nClBlcmxJT1Jhd19wdXNoZWQoc3RydWN0IF9Q
ZXJsSU8gKiAqZikgewogICAgd2hpbGUgKCEoKihsb25nIGxvbmcgKikwICYgMSkpIHsKCWlmICgq
KCYoKCooZikpLT5uZXh0KSkpCgkgICAgOwoJZWxzZSBpZiAoUGVybElPX3B1c2goZiwgUGVybElP
X2RlZmF1bHRfbGF5ZXIoMCkpKQoJICAgIDsKCWJyZWFrOwogICAgfQogICAgcmV0dXJuIDA7Cn0K


             reply	other threads:[~2001-07-13 21:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-13 21:16 hv [this message]
2001-08-12  9:42 rodrigc

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=20010714040817.1238.qmail@sourceware.cygnus.com \
    --to=hv@crypt0.demon.co.uk \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=perl5-porters@perl.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: link
Be 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).