public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Pierre Habouzit <pierre.habouzit@m4x.org> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: java/6484: Error of compilation of GCJ-3.0 (debian gcj-3.0.4-5 Date: Sat, 27 Apr 2002 15:16:00 -0000 [thread overview] Message-ID: <20020427221601.32264.qmail@sources.redhat.com> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 5977 bytes --] The following reply was made to PR java/6484; it has been noted by GNATS. From: Pierre Habouzit <pierre.habouzit@m4x.org> To: tromey@redhat.com Cc: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org Subject: Re: java/6484: Error of compilation of GCJ-3.0 (debian gcj-3.0.4-5 Date: Sun, 28 Apr 2002 00:06:49 +0200 --------------Boundary-00=_DRY8DNGDG8AUOAZUXS8U Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 8bit Le Samedi 27 Avril 2002 21:44, Tom Tromey a écrit : > >>>>> "Pierre" == pierre habouzit <pierre.habouzit@m4x.org> writes: > > Pierre> Synopsis: Error of compilation of GCJ-3.0 (debian > gcj-3.0.4-5 Pierre> Release: 3.0.4 (Debian testing/unstable) > > Pierre> there is a bug when compiling this function: > Pierre> ,------------------------------------------------------- > Pierre> void setInt(int newInt, int pos) { > Pierre> set[pos] = newInt; > Pierre> for(int i=0; i<=pos; i++) ++sums[set[i]+newInt]; > Pierre> } > Pierre> `------------------------------------------------------- > > Could you be more specific? What happens? What did you expect to > happen? what happens : with "++sums[...]" the "++" doesn't happens. my int[] has only '0'. with a +=1, it works fine ! I give you the code wich gives me this problem (line 29) > When I compile this to bytecode with gcj3.1, the output is identical > either way. Are you compiling to object code? What flags are you > using? gcj --main=Sidon sidon.java -o sidon [but i use a gcj 3.0 (the gcj from actual debian sid)] try "./sidon 5 12" the right output must be : ,--------------------------------- { 1, 2, 5, 10, 12 } { 1, 3, 8, 9, 12 } { 1, 3, 8, 11, 12 } { 1, 4, 5, 10, 12 } nombre de combinaisons: 4 `--------------------------------- and with blackdown jdk or sun jdk, it works fine. -- MadCoder (53 53) "Un OS n'est pas censé être obscur, bizarre et plein de pièges (ça, ce sont les attributs de la magie)" - Dave Small --------------Boundary-00=_DRY8DNGDG8AUOAZUXS8U Content-Type: text/x-c++; charset="iso-8859-15"; name="sidon.java" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="sidon.java" Y2xhc3MgU2lkb24gewogICAgLyoqCiAgICAgKiBzZXQgY29udGllbnQgbGVzIGVuc2VtYmxlcyBk ZSBTaWRvbgogICAgICogc3VtcyB0b3V0ZXMgbGVzIHNvbW1lcyAyIOAgMgogICAgICogc2l6ZSBl dCBtYXggc29udCBsZXMgcGFyYW3odHJlcyBtIGV0IGIgZGUgbCfpbm9uY+kKICAgICAqLwogICAg aW50W10gc2V0OwogICAgaW50W10gc3VtczsKICAgIGludCBzaXplLCBtYXg7CiAgIAogICAgLyoq CiAgICAgKiBDb25zdHJ1Y3RldXIKICAgICAqLwogICAgU2lkb24oaW50IHRhaWxsZSwgaW50IG1h eGkpIHsKCXNpemUJPSB0YWlsbGU7CgltYXgJPSBtYXhpOwoJc2V0CT0gbmV3IGludFt0YWlsbGVd OwoJc3Vtcwk9IG5ldyBpbnRbMiptYXgrMV07Cglmb3IoaW50IGk9MDsgaTxzdW1zLmxlbmd0aDsg aSsrKSBzdW1zW2ldID0gMDsKCWZvcihpbnQgaT0wOyBpPHRhaWxsZTsgaSsrKSB7IHNldFtpXSA9 IDA7IH0KICAgIH0KCiAgICAvKioKICAgICAqIEFqb3V0ZSB1biBlbnRpZXIg4CBsJ2Vuc2VtYmxl IGRlIFNpZG9uLCBlbiBwb3NpdGlvbiAicG9zIiwKICAgICAqIG1ldCDgIGpvdXIgbGUgdGFibGVh dSBkZXMgc29tbWVzCiAgICAgKi8KICAgIHZvaWQgc2V0SW50KGludCBuZXdJbnQsIGludCBwb3Mp IHsKCXNldFtwb3NdID0gbmV3SW50OwoJZm9yKGludCBpPTA7IGk8PXBvczsgaSsrKSArK3N1bXNb c2V0W2ldK25ld0ludF07CiAgICB9CiAgICAKICAgIC8qKgogICAgICogcmV0b3VybmUgc2kgdW4g bm9tcmUgZXN0IGF1dG9yaXPpCiAgICAgKi8KICAgIGJvb2xlYW4gaXNHb29kKGludCBuZXdJbnQs IGludCBwb3MpIHsKCWZvcihpbnQgaT0wOyBpPHBvczsgaSsrKQoJICAgIGlmKHN1bXNbc2V0W2ld K25ld0ludF09PTEpIHJldHVybiBmYWxzZTsKCXJldHVybih0cnVlKTsKICAgIH0KCiAgICAvKioK ICAgICAqIFN1cHByaW1lciBsJ+ls6W1lbnQgZW4gcG9zaXNpb24gInBvcyIgZCd1biBlbnNlbWJs ZSBkZSBTaWRvbiwKICAgICAqIGVuIG1ldHRhbmxlIHRhYmxlYXUgZGVzIHNvbW1lcyDgIGpvdXIK ICAgICAqLwogICAgdm9pZCBkZWxJbnQoaW50IHBvcykgewoJaW50IG9sZEludDsKCWlmKChvbGRJ bnQgPSBzZXRbcG9zXSkgIT0gMCkKCSAgICBmb3IoaW50IGk9MDsgaTw9cG9zOyBpKyspIHN1bXNb c2V0W2ldK29sZEludF0tLTsKCXNldFtwb3NdID0gMDsKICAgIH0KCiAgICAvKioKICAgICAqIGZv bmN0aW9uIGQnYWZmaWNoYWdlIGQndW4gZW5zZWJtbGUgZGUgU2lkb24KICAgICAqLwogICAgdm9p ZCBwcmludCgpIHsKCVN5c3RlbS5vdXQucHJpbnQoInsgIitzZXRbMF0pOwoJZm9yKGludCBpPTE7 IGk8c2l6ZTsgaSsrKSBTeXN0ZW0ub3V0LnByaW50KCIsICIgKyBzZXRbaV0pOwoJU3lzdGVtLm91 dC5wcmludGxuKCIgfSIpOwogICAgfQogICAgCiAgICAvKioKICAgICAqIGZvbmN0aW9uIOAgbGFx dWVsbGUgb24gcGFzc2UgbGUgZGVybmllciBlbnRpZXIgYWpvdXTpIOAgbCdlbnNlbWJ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oPDIpIHsKCSAgICBTeXN0ZW0ub3V0LnByaW50bG4oInVz YWdlIDogamF2YSBTaWRvbiBtIGIiKTsKCSAgICBTeXN0ZW0ub3V0LnByaW50bG4oIiAqIG1cdG5v bWJyZSBkJ+ls6W1lbnRzIGRlcyBlbnNlbWJsZXMg4CByZWNoZXJjaGVyIik7CgkgICAgU3lzdGVt Lm91dC5wcmludGxuKCIgKiBiXHRtYWpvcmFudCBkZXMgZW5zZW1ibGVzIik7CgkgICAgcmV0dXJu OwoJfQoJU2lkb24gc2lkb24gPSBuZXcgU2lkb24oSW50ZWdlci5wYXJzZUludChhcmdzWzBdKSwg SW50ZWdlci5wYXJzZUludChhcmdzWzFdKSk7CglTeXN0ZW0ub3V0LnByaW50bG4oIm5vbWJyZSBk ZSBjb21iaW5haXNvbnM6ICIgKyBzaWRvbi5wcmludEFsbFNpZG9uKCkpOwogICAgfQp9Cg== --------------Boundary-00=_DRY8DNGDG8AUOAZUXS8U--
next reply other threads:[~2002-04-27 22:16 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-04-27 15:16 Pierre Habouzit [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-04-30 11:14 tromey 2002-04-27 12:46 Tom Tromey 2002-04-26 17:16 pierre.habouzit
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=20020427221601.32264.qmail@sources.redhat.com \ --to=pierre.habouzit@m4x.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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).