This is the mail archive of the
mailing list for the GCC project.
Re: [gfortran] Make all labels DECL_ARTIFICIAL
- From: Feng Wang <wf_cs at yahoo dot com>
- To: Steven Bosscher <stevenb at novell dot com>, fortran at gcc dot gnu dot org
- Cc: Feng Wang <wf_cs at yahoo dot com>, Paul Brook <paul at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 2 Feb 2005 18:09:54 +0800 (CST)
- Subject: Re: [gfortran] Make all labels DECL_ARTIFICIAL
--- Steven Bosscher <email@example.com> 的正文：
> On Wednesday 02 February 2005 04:44, Feng Wang wrote:
> > When fixing PR18827, I found this was wrong. Making USER labels artificial
> > will make it removed incorrectly under some circumstances. i.e. if we
> > assign a label to a globle variable and don't use the label and variable
> > elsewhere in the module, the optimization will remove the label but leave
> > the assignment. This will cause linking error.
> Sounds like the middle-end removes artificial labels even if they
> are addressable, or the front end not marking the label as such.
> Can you see in the dumps where the label disappears?
I tried to set TREE_ADDRESSABLE or FORCED_LABEL flags to the label, but they
were useless. From the dumps (used -da option), it is correct in *.00.expand
with one uses. But the number of uses is set to zero in *.01.sibling, at lease
the label exists. In the *.03.jump the label is removed.
I tried to debug and found that it seemed to be removed in cfgrtl.c by
delete_insn(). Hope this can help.
Do You Yahoo!?