This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17972] [3.4 Regression] const/pure functions result in bad asm
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Dec 2004 08:01:12 -0000
- Subject: [Bug c++/17972] [3.4 Regression] const/pure functions result in bad asm
- References: <20041013124723.17972.mostrows@watson.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-12-07 08:01 -------
> I checked again with a current x86 gcc, 3.4.4 20041206, and the problem is
> still there. Note that this only happens with cc1plus.
Sorry, you're right, I was able to reproduce on i586-redhat-linux-gnu and
i586-mandrake-linux-gnu but I needed -mtune=i686.
> As to why we get the "impossible" assembly, what happens is that the inline
> function cti gets expanded twice, but the first return label is used for both
> expansions:
>
> cti body
> jump ret_label
> ret_label
> cti body
> jump ret_label
Thanks for the analysis. I'm going to investigate.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17972