From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7950 invoked by alias); 14 May 2003 14:36:02 -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 7856 invoked by uid 71); 14 May 2003 14:36:01 -0000 Resent-Date: 14 May 2003 14:36:01 -0000 Resent-Message-ID: <20030514143601.7855.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 Resent-Reply-To: gcc-gnats@gcc.gnu.org, yanliu@ca.ibm.com Received: (qmail 18309 invoked by uid 48); 14 May 2003 14:27:05 -0000 Message-Id: <20030514142705.18308.qmail@sources.redhat.com> Date: Wed, 14 May 2003 14:36:00 -0000 From: yanliu@ca.ibm.com Reply-To: yanliu@ca.ibm.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/10781: wrong class size and alignment with static class member X-SW-Source: 2003-05/txt/msg01645.txt.bz2 List-Id: >Number: 10781 >Category: c++ >Synopsis: wrong class size and alignment with static class member >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Wed May 14 14:36:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Yan Liu >Release: 3.2 >Organization: >Environment: >Description: Here is the testcase: struct S { static double sval; double get_sval() {return sval;}; }; double S::sval=10000.0; Using the following compiling command: /opt/cross/bin/powerpc64-linux-g++ -fdump-class-hierarchy a.C we get the following class layout: Class A size=8 align=8 A (0x40066100) 0 empty The testcase only fails on 64 bit mode. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: