From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1971 invoked by alias); 28 Sep 2005 20:40:36 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 1921 invoked by alias); 28 Sep 2005 20:40:33 -0000 Date: Wed, 28 Sep 2005 20:40:00 -0000 Message-ID: <20050928204033.1920.qmail@sourceware.org> From: "mark at codesourcery dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050714141428.22488.micis@gmx.de> References: <20050714141428.22488.micis@gmx.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/22488] [4.1 Regression] push_fields_onto_fieldstack calculates offset incorrectly X-Bugzilla-Reason: CC X-SW-Source: 2005-09/txt/msg03537.txt.bz2 List-Id: ------- Additional Comments From mark at codesourcery dot com 2005-09-28 20:40 ------- Subject: Re: [4.1 Regression] push_fields_onto_fieldstack calculates offset incorrectly dberlin at dberlin dot org wrote: >>>And besides, my approach isn't lying at all about this testcase; since >>>there's only one appearance of the virtual base, it appears exactly >>>where the field lists say it will. Daniel agreed that the problem is in >>>his code. >> >>What I meant by "lying" (an admittedly overly contentious choice of >>word) was that the field for B-in-C is marked as having the complete B >>type due to the code at the end of layout_class_type. However, the A >>virtual base isn't located in that B; it's located after the data >>members of C. So, the base field for B is incorrect. > > > If you give me guys a way to detect this case from the middle end, i'm > happy to say "Don't walk this structure, it's not really there". > > :) I don't think there's anyway to do that reliably. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22488