This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
- From: "amylaar at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Feb 2006 21:41:54 -0000
- Subject: [Bug c/26004] [4.1/4.2 Regression] gcc errors on valid code [SVO]
- References: <bug-26004-12087@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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