This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
libgcj/5852: BigInteger.gcd() returning wrong results
- From: marc at perisic dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 6 Mar 2002 15:50:52 -0000
- Subject: libgcj/5852: BigInteger.gcd() returning wrong results
- Reply-to: marc at perisic dot com
>Number: 5852
>Category: libgcj
>Synopsis: BigInteger.gcd() returning wrong results
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 06 07:56:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: gcj / gcc version 2.96 20000731 (Red Hat Linux 7.0)
>Release: 2.96
>Organization:
>Environment:
Linux
>Description:
The gcd of 16983563041 and 260642 is wrongly computed
as 1. The right value is 130321.
>How-To-Repeat:
gcj --main=GcdBug GcdBug.java ; ./a.out
>Fix:
not available
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="GcdBug.java"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="GcdBug.java"
aW1wb3J0IGphdmEubWF0aC4qOwoKcHVibGljIGNsYXNzIEdjZEJ1ZyB7IAogIHB1YmxpYyBzdGF0
aWMgdm9pZCBtYWluKFN0cmluZyBbXSBhcmdzICkgewogICAgIEJpZ0ludGVnZXIgYSAgPSBuZXcg
QmlnSW50ZWdlciggIjE2OTgzNTYzMDQxIiApOwogICAgIEJpZ0ludGVnZXIgYiAgPSBuZXcgQmln
SW50ZWdlciggIjI2MDY0MiIgKTsKICAgICBCaWdJbnRlZ2VyIGMgPSBhLmdjZChiKTsgCiAgICAg
U3lzdGVtLm91dC5wcmludGxuKCJjID0gZ2NkKGEsYikgPSAiICsgYyArIiBzaG91bGQgYmUgIDEz
MDMyMSIpOyAKICAgICB9Cn0K