From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31175 invoked by alias); 18 Feb 2004 08:49:59 -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 31140 invoked by uid 48); 18 Feb 2004 08:49:57 -0000 Date: Wed, 18 Feb 2004 08:49:00 -0000 Message-ID: <20040218084957.31139.qmail@sources.redhat.com> From: "wilson at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20020909143600.7871.rz@linux-m68k.org> References: <20020909143600.7871.rz@linux-m68k.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug optimization/7871] [3.3/3.4/3.5 regression] ICE on legal code, global register variables problems X-Bugzilla-Reason: CC X-SW-Source: 2004-02/txt/msg01775.txt.bz2 List-Id: ------- Additional Comments From wilson at gcc dot gnu dot org 2004-02-18 08:49 ------- The patch that Eric Botcazou is proposing is identical to one of the early patches I tried. See comment #9. Unfortunately, I neglected to include the patch in this bug report, which obscured it. The patch did not work for me when I tried it. Indeed, if I apply Eric's patch to gcc-3.3.x, it does not work. It works in current sources apparently by accident. See the Oct 10 combine.c distribute_links patch from Richard Kenner. http://gcc.gnu.org/ml/gcc-patches/2003-10/msg00820.html Note that he added a reg_set_p call, and note that reg_set_p assumes that a call clobbers all hard registers, which is technically not correct. This wrong assumption is documented with a ??? comment. I do think Eric's patch is a good one. However, if we go this route, then we have a latent problem with LOG_LINKS that may reappear in the future. We should be concerned about this. I discuss this issue in comment #9 a little bit. We need to make sure that LOG_LINKS involving global_regs are treated specially. Currently, they are treated correctly by accident. Adding some comments to distribute_notes and reg_set_p to document this would be a start. Perhaps that is all we can do for now. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7871