This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] target/37283: Fix -fno-unit-at-a-time and ?-fno-toplevel-reorder handling
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Samuel Tardieu <sam at rfc1149 dot net>
- Cc: Ian Lance Taylor <iant at google dot com>, Paul Brook <paul at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, Andrew Pinski <pinskia at gmail dot com>
- Date: Tue, 02 Sep 2008 15:12:53 -0700
- Subject: Re: [PATCH] target/37283: Fix -fno-unit-at-a-time and ?-fno-toplevel-reorder handling
- References: <20080829230112.26798.87632.stgit@dawn.rfc1149.net> <de8d50360808291624s121d079fmbb80e6416a72972c@mail.gmail.com> <m3wshuz8o1.fsf@google.com> <1220385009.6577.15.camel@janis-laptop> <2008-09-02-22-53-51+trackit+sam@rfc1149.net>
- Reply-to: janis187 at us dot ibm dot com
On Tue, 2008-09-02 at 22:53 +0200, Samuel Tardieu wrote:
> * Janis Johnson <janis187@us.ibm.com> [2008-09-02 12:50:09 -0700]
>
> | The comment was moved and now describes the code to which it is
> | attached, but I think that code is wrong. It doesn't disable
> | section anchors for no toplevel reorder, and from what I've heard
> | in this group before, section anchors should be disabled with
> | no toplevel reorder. At least that's the case for powerpc-linux
> | which is now broken again for PR target/36756.
>
> The code I moved now does what it describes indeed, while before the
> patch it had a bogus effect. That being said, I have no idea of whether it
> makes sense to implicitely use "-fno-toplevel-reorder -fsection-anchors"
> as is currently done at -O0.
>
> As you note, the code found a few lines below prohibits this
> combination when the user asks for it explicitely:
>
> else if (!flag_toplevel_reorder)
> {
> if (flag_section_anchors == 1)
> error ("section anchors must be disabled when toplevel reorder is disabled");
> flag_section_anchors = 0;
> }
>
> Does the following patch fix target/36756 for you?
It does, and with that your change to rs6000.c is fine.
On more nit, though, with this patch if I say -fsection-anchors with
no other options then it's silently ignored rather than getting an
error.
Janis