public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/6484: Error of compilation of GCJ-3.0 (debian gcj-3.0.4-5
@ 2002-04-27 15:16 Pierre Habouzit
0 siblings, 0 replies; 4+ messages in thread
From: Pierre Habouzit @ 2002-04-27 15:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
[-- 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
dSBkZXMgc29tbWVzCiAgICAgKi8KICAgIHZvaWQgc2V0SW50KGludCBuZXdJ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dm9pZCBtYWluKFN0cmluZyBh
cmdzW10pIHsKCWlmKGFyZ3MubGVuZ3RoPDIpIHsKCSAgICBTeXN0ZW0ub3V0LnByaW50bG4oInVz
YWdlIDogamF2YSBTaWRvbiBtIGIiKTsKCSAgICBTeXN0ZW0ub3V0LnByaW50bG4oIiAqIG1cdG5v
bWJyZSBkJ+ls6W1lbnRzIGRlcyBlbnNlbWJsZXMg4CByZWNoZXJjaGVyIik7CgkgICAgU3lzdGVt
Lm91dC5wcmludGxuKCIgKiBiXHRtYWpvcmFudCBkZXMgZW5zZW1ibGVzIik7CgkgICAgcmV0dXJu
OwoJfQoJU2lkb24gc2lkb24gPSBuZXcgU2lkb24oSW50ZWdlci5wYXJzZUludChhcmdzWzBdKSwg
SW50ZWdlci5wYXJzZUludChhcmdzWzFdKSk7CglTeXN0ZW0ub3V0LnByaW50bG4oIm5vbWJyZSBk
ZSBjb21iaW5haXNvbnM6ICIgKyBzaWRvbi5wcmludEFsbFNpZG9uKCkpOwogICAgfQp9Cg==
--------------Boundary-00=_DRY8DNGDG8AUOAZUXS8U--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: java/6484: Error of compilation of GCJ-3.0 (debian gcj-3.0.4-5
@ 2002-04-30 11:14 tromey
0 siblings, 0 replies; 4+ messages in thread
From: tromey @ 2002-04-30 11:14 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, java-prs, nobody, pierre.habouzit, tromey
Synopsis: Error of compilation of GCJ-3.0 (debian gcj-3.0.4-5
Responsible-Changed-From-To: unassigned->tromey
Responsible-Changed-By: tromey
Responsible-Changed-When: Tue Apr 30 11:14:24 2002
Responsible-Changed-Why:
I'm handling this.
State-Changed-From-To: open->closed
State-Changed-By: tromey
State-Changed-When: Tue Apr 30 11:14:24 2002
State-Changed-Why:
Hi Pierre. Thanks for sending the test case.
I tried it with gcj 3.1 and it worked perfectly.
So I believe this problem has been fixed.
3.1 will be out fairly soon, so I am closing the PR.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6484
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: java/6484: Error of compilation of GCJ-3.0 (debian gcj-3.0.4-5
@ 2002-04-27 12:46 Tom Tromey
0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2002-04-27 12:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR java/6484; it has been noted by GNATS.
From: Tom Tromey <tromey@redhat.com>
To: pierre.habouzit@m4x.org
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: 27 Apr 2002 13:44:59 -0600
>>>>> "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?
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?
Can you send a complete short program that shows the exact problem?
That would be most convenient.
Thanks,
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* java/6484: Error of compilation of GCJ-3.0 (debian gcj-3.0.4-5
@ 2002-04-26 17:16 pierre.habouzit
0 siblings, 0 replies; 4+ messages in thread
From: pierre.habouzit @ 2002-04-26 17:16 UTC (permalink / raw)
To: gcc-gnats, debian-gcc
>Number: 6484
>Category: java
>Synopsis: Error of compilation of GCJ-3.0 (debian gcj-3.0.4-5
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri Apr 26 17:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: MadCoder
>Release: 3.0.4 (Debian testing/unstable)
>Organization:
>Environment:
System: Linux madcoder 2.4.18 #1 mer avr 17 16:07:21 CEST 2002 i686 unknown
Architecture: i686
host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux
>Description:
there is a bug when compiling this function:
,-------------------------------------------------------
void setInt(int newInt, int pos) {
set[pos] = newInt;
for(int i=0; i<=pos; i++) ++sums[set[i]+newInt];
}
`-------------------------------------------------------
where set is an int[].
but the compilation is good when you use :
,-------------------------------------------------------
void setInt(int newInt, int pos) {
set[pos] = newInt;
for(int i=0; i<=pos; i++) sums[set[i]+newInt] += 1;
}
`-------------------------------------------------------
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-04-30 18:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-27 15:16 java/6484: Error of compilation of GCJ-3.0 (debian gcj-3.0.4-5 Pierre Habouzit
-- 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
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).