[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#222375: marked as done (g++-2.95 incorrectly handles in64_t type with optimizing)



Your message dated 28 Nov 2003 13:32:17 +0100
with message-id <871xrsptbi.fsf@student.uni-tuebingen.de>
and subject line Bug#222375: Acknowledgement (g++-2.95 incorrectly handles in64_t type with optimizing)
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 28 Nov 2003 10:27:20 +0000
>From a.khlebnikau@sam-solutions.net Fri Nov 28 04:27:19 2003
Return-path: <a.khlebnikau@sam-solutions.net>
Received: from mail.sam-solutions.net (mail.belcaf.minsk.by) [217.21.35.41] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1APfqI-00028j-00; Fri, 28 Nov 2003 04:27:18 -0600
Received: from pc166.sam-solutions.net ([192.168.111.195]) by
          mail.belcaf.minsk.by (MTA 4.15) with ESMTP id HP251C00.78X for
          <submit@bugs.debian.org>; Fri, 28 Nov 2003 12:27:12 +0200 
Received: from localhost
	([127.0.0.1] helo=pc166 ident=khlebnikov)
	by pc166.sam-solutions.net with smtp (Exim 3.35 #1 (Debian))
	id 1APfpx-0000Oe-00
	for <submit@bugs.debian.org>; Fri, 28 Nov 2003 12:26:57 +0200
Date: Fri, 28 Nov 2003 12:26:56 +0200
From: Alexei Khlebnikov <a.khlebnikau@sam-solutions.net>
To: submit@bugs.debian.org
Subject: g++-2.95 incorrectly handles in64_t type with optimizing
Message-Id: <[🔎] 20031128122656.22ab54be.a.khlebnikau@sam-solutions.net>
Organization: sam-solutions
X-Mailer: Sylpheed version 0.7.4 (GTK+ 1.2.10; i386-debian-linux-gnu)
Mime-Version: 1.0
Content-Type: multipart/mixed;
 boundary="Multipart_Fri__28_Nov_2003_12:26:56_+0200_0823e0a0"
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 
	2.60-master.debian.org_2003_11_25-bugs.debian.org_2003_11_20 
	(1.212-2003-09-23-exp) on master.debian.org
X-Spam-Status: No, hits=-4.0 required=4.0 tests=BAYES_99,HAS_PACKAGE 
	autolearn=no 
	version=2.60-master.debian.org_2003_11_25-bugs.debian.org_2003_11_20
X-Spam-Level: 

This is a multi-part message in MIME format.

--Multipart_Fri__28_Nov_2003_12:26:56_+0200_0823e0a0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Package: g++-2.95
Version: 1:2.95.4-19

When combine working with int32 and int64, not all operations performed
correctly.

Here is code example
=begin
#include <stdint.h>
#include <stdio.h>
#include <iostream>


int main()
{
        const long int offset = 1025;

	FILE* F = fopen("samplefile", "r");
	fseek(F, offset, SEEK_SET);
        const int64_t num2 = ftell(F);

	std::cerr << num2 / 1024 << ", must be 1\n";

	fclose(F);
	return 0;
}
=end

Here is a script, showing incorrect behaviour:
=begin
#!/bin/sh

CXX=g++-2.95

dd if=/dev/zero of=samplefile bs=2K count=1
rm -f ./int64
$CXX -v
$CXX -O3 -o ./int64 int64.cpp
./int64
=end

The script's output:
=begin
1+0 records in
1+0 records out
2048 bytes transferred in 0.007738 seconds (264668 bytes/sec)
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
2, must be 1
=end

The bug is reproduceable at least on Pentium 1 and Pentium 4 debian machines.
I've tried this testcase on Alt Linux Master 2.0 with g++ 2.95.3,
the bug is not reproduceable there. Seems like it is debian-specific bug.

When not optimizing, the bug is not triggered, and the lasy line is printed as
"1, must be 1".

When using g++-3.0, g++-3.2 or g++-3.3 with optimizing, the last line
is also printed correctly.

I attach to this mail the source and the script.

--Multipart_Fri__28_Nov_2003_12:26:56_+0200_0823e0a0
Content-Type: application/octet-stream;
 name="int64-bug.tar.gz"
Content-Disposition: attachment;
 filename="int64-bug.tar.gz"
Content-Transfer-Encoding: base64

H4sIANofxz8CA+3VT2/aMBQA8Fzxp3jLdoAViB3sRCuklwmkqZN26A49TKpI4kBEYiPH4bBp330O
BTqk/TlsVNr0fhcnfnZs6fk5pbIRH6XtKvAuhlJOYyFcS1ks6PftkUfjOGIRi2MWeZRNolh4ILxn
0DZ2aQC8zbqSqSo3evfjcb+L/6PKU/73T+Nsu/37+WeURpz/NP+cT475FyLs8i8mnHpAMf8X97JU
WdXmEmaNzd0RGK9vyHmfPu8qdWONXNY3hBA3HuplqfoD8oXAQaZVY6HSagVdXBdFIy0kwGgopoT0
Fu/ez1/DwvUUeitV32+W9baSRVlJfwi+8QdT0nNz5Ka/GB6mD+FuPr99uJt/dMHzhfbH9sGCauuw
+6aVVdVfDLqV3O6vrzNpDMxmj/Gg2wXvXt1StUs9pBLYJ+V3w4us0o3cz+0ZaVujgE7JV+L9z57q
37TqUve/q/9f3f8hZaf7n/Ou/jlnAuv/Wer/RZCWKmjWhLy9v09WV1ejcPxGEJLnUBZJkMtd8Fka
7QoxeSpUSJskvHUV2CqbMGJqGBUwfvyFkFfuQzDaHdoPExjpYwxOPxlyHO0hhBBCCCGEEEIIIYQQ
QgghhBBC6E99A++hut4AKAAA

--Multipart_Fri__28_Nov_2003_12:26:56_+0200_0823e0a0--

---------------------------------------
Received: (at 222375-done) by bugs.debian.org; 28 Nov 2003 12:32:30 +0000
>From falk.hueffner@student.uni-tuebingen.de Fri Nov 28 06:32:30 2003
Return-path: <falk.hueffner@student.uni-tuebingen.de>
Received: from mx5.informatik.uni-tuebingen.de [134.2.12.32] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1APhnR-0001Qn-00; Fri, 28 Nov 2003 06:32:30 -0600
Received: from localhost (loopback [127.0.0.1])
	by mx5.informatik.uni-tuebingen.de (Postfix) with ESMTP id 7EEA512B
	for <222375-done@bugs.debian.org>; Fri, 28 Nov 2003 13:32:21 +0100 (NFT)
Received: from mx5.informatik.uni-tuebingen.de ([127.0.0.1])
 by localhost (mx5 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 20818-03 for <222375-done@bugs.debian.org>;
 Fri, 28 Nov 2003 13:32:20 +0100 (NFT)
Received: from juist (semeai.Informatik.Uni-Tuebingen.De [134.2.15.66])
	by mx5.informatik.uni-tuebingen.de (Postfix) with ESMTP id 8E86E117
	for <222375-done@bugs.debian.org>; Fri, 28 Nov 2003 13:32:19 +0100 (NFT)
Received: from falk by juist with local (Exim 3.36 #1 (Debian))
	id 1APhnF-0004dF-00
	for <222375-done@bugs.debian.org>; Fri, 28 Nov 2003 13:32:17 +0100
X-Face: "iUeUu$b*W_"w?tV83Y3*r:`rh&dRv}$YnZ3,LVeCZSYVuf[Gpo*5%_=/\_!gc_,SS}[~xZ
 wY77I-M)xHIx:2f56g%/`SOw"Dx%4Xq0&f\Tj~>|QR|vGlU}TBYhiG(K:2<T^
To: 222375-done@bugs.debian.org
Subject: Re: Bug#222375: Acknowledgement (g++-2.95 incorrectly handles in64_t type with optimizing)
References: <[🔎] 20031128122656.22ab54be.a.khlebnikau@sam-solutions.net>
	<handler.222375.B.10700152408365.ack@bugs.debian.org>
	<[🔎] 20031128131249.0d85c4c0.a.khlebnikau@sam-solutions.net>
From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
Date: 28 Nov 2003 13:32:17 +0100
In-Reply-To: <[🔎] 20031128131249.0d85c4c0.a.khlebnikau@sam-solutions.net>
Message-ID: <871xrsptbi.fsf@student.uni-tuebingen.de>
Lines: 3
User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.5 (cabbage)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: by amavisd-new (McAfee AntiVirus) at informatik.uni-tuebingen.de
Delivered-To: 222375-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 
	2.60-master.debian.org_2003_11_25-bugs.debian.org_2003_11_20 
	(1.212-2003-09-23-exp) on master.debian.org
X-Spam-Status: No, hits=-2.0 required=4.0 tests=BAYES_70,FOOASDF,
	HAS_BUG_NUMBER autolearn=no 
	version=2.60-master.debian.org_2003_11_25-bugs.debian.org_2003_11_20
X-Spam-Level: 

Closing as duplicate.

        Falk



Reply to: