From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22170 invoked by alias); 10 Sep 2002 09:36:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 22143 invoked by uid 71); 10 Sep 2002 09:36:02 -0000 Resent-Date: 10 Sep 2002 09:36:02 -0000 Resent-Message-ID: <20020910093602.22142.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, anthony_w@onetel.net.uk Resent-Reply-To: gcc-gnats@gcc.gnu.org, anthwil@nortelnetworks.com Received: (qmail 21703 invoked by uid 61); 10 Sep 2002 09:33:42 -0000 Message-Id: <20020910093342.21702.qmail@sources.redhat.com> Date: Tue, 10 Sep 2002 02:36:00 -0000 From: anthwil@nortelnetworks.com Reply-To: anthwil@nortelnetworks.com To: gcc-gnats@gcc.gnu.org Cc: anthony_w@onetel.net.uk X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: anthony_w@onetel.net.uk Subject: c++/7877: Incorrect parameter passing to specializations of member function templates X-SW-Source: 2002-09/txt/msg00167.txt.bz2 List-Id: >Number: 7877 >Category: c++ >Synopsis: Incorrect parameter passing to specializations of member function templates >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Tue Sep 10 02:36:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Anthony Williams >Release: g++ 3.1 (mingw32 and sparc-solaris-2.7) and g++ 3.2 (mingw32) >Organization: >Environment: Reading specs from d:/local/mingw/bin/../lib/gcc-lib/mingw32/3.1/specs Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host= mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable -languages=f77,c++,objc,ada --disable-win32-registry --disable-shared Thread model: win32 gcc version 3.1 and Reading specs from d:/local/mingw/bin/../lib/gcc-lib/i686-pc-mingw32/3.2/specs Configured with: ../gcc-3.2-20020817-1/configure --enable-languages=c,c++ --pref ix=d:/local/mingw --enable-threads Thread model: win32 gcc version 3.2 (mingw special 20020817-1) and Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.1/specs Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-nls Thread model: posix gcc version 3.1 >Description: When the attached program is run, the two output lines are different, when they should be the same. e.g.: lhs=0x22ff6c, rhs=0x22ff68 lhs=0x22ff68, rhs=0x22ff70 This translates into serious bugs, as variables are read incorrectly and random memory is accessed and updated. >How-To-Repeat: Compile and run the attached program >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="testtemp.cpp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="testtemp.cpp" I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGU8dHlwZW5hbWUgVD4Kc3RydWN0IEEKewogICAg dGVtcGxhdGU8dHlwZW5hbWUgSW5wdXRJdGVyYXRvcj4KICAgIHN0YXRpYyBpbnQgZihJbnB1dEl0 ZXJhdG9yJiBsaHMsSW5wdXRJdGVyYXRvciYgcmhzKTsKfTsKCnN0cnVjdCBUYWcxOwoKdGVtcGxh dGU8Pgp0ZW1wbGF0ZTx0eXBlbmFtZSBJbnB1dEl0ZXJhdG9yPgppbnQgQTxUYWcxPjo6ZihJbnB1 dEl0ZXJhdG9yJiBsaHMsSW5wdXRJdGVyYXRvciYgcmhzKQp7CiAgICBzdGQ6OmNvdXQ8PCJsaHM9 Ijw8Jmxoczw8IiwgcmhzPSI8PCZyaHM8PHN0ZDo6ZW5kbDsKICAgIHJldHVybiAwOwp9CgppbnQg bWFpbigpCnsKICAgIGNoYXIgKmxocywqcmhzOwogICAgc3RkOjpjb3V0PDwibGhzPSI8PCZsaHM8 PCIsIHJocz0iPDwmcmhzPDxzdGQ6OmVuZGw7CgogICAgQTxUYWcxPjo6ZihsaHMscmhzKTsKICAg IHJldHVybiAwOwp9Cgo=