This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/7871] [3.3/3.4/3.5 regression] ICE on legal code, global register variables problems
- From: "wilson at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Feb 2004 08:49:57 -0000
- Subject: [Bug optimization/7871] [3.3/3.4/3.5 regression] ICE on legal code, global register variables problems
- References: <20020909143600.7871.rz@linux-m68k.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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