From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2797 invoked by alias); 15 Feb 2006 21:41:56 -0000 Received: (qmail 2761 invoked by uid 48); 15 Feb 2006 21:41:54 -0000 Date: Wed, 15 Feb 2006 21:41:00 -0000 Message-ID: <20060215214154.2760.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO] In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "amylaar at gcc dot gnu dot org" 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 X-SW-Source: 2006-02/txt/msg01747.txt.bz2 List-Id: ------- Comment #8 from amylaar at gcc dot gnu dot org 2006-02-15 21:41 ------- Created an attachment (id=10857) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10857&action=view) infrastructure patch - defective (In reply to comment #7) > This should be a relatively straightforward fix. I had a go at this, but ran into a problem. When an optimizer requests a variable to be made addressable, I think we need to keep track of this, so that we don't complain henceforth when the address is taken again, where addressing the variable once causes further instances of addressing it. I thought I could reset DECL_REGISTER for this purpose, and accept addressing if DECL_REGISTER is cleared on entry in c_mark_addressable. (The C front end uses C_DECL_REGISTER to keep track of a variable being declared register, and DECL_REGISTER more or less means that we intent do use this as a register.) However, this causes a regression on gcc.dg/reg-vol-struct-1.c line 16 - the DECL_REGISTER flag has already been reset for 'a' on account of it being volatile. So it appears that we need another flag to keep track of when a register has been made addressable on behalf of the optimizers. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26004