This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR tree-optimization/55079: Don't remove all exits of a loop during loop unroll
- From: Ian Lance Taylor <iant at google dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Nov 2012 07:26:48 -0800
- Subject: Re: [PATCH] PR tree-optimization/55079: Don't remove all exits of a loop during loop unroll
- References: <20121109184142.597e9d2c@spoyarek>
On Fri, Nov 9, 2012 at 5:11 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
>
> I understand that the behaviour is undefined, but this is easily
> avoidable by skipping removal of the exits if it results in an infinite
> loop. Attached patch does exactly that.
I don't mind saying that GCC should define cases that the language
standards leave undefined. But that does not seem to be what this
patch does. I don't see why this is a good idea. It seems to produce
a program that is unpredictable in a different way. How does that
help the user? If anything an infinite loop might be better, since it
is more obvious that something is wrong. Unless I misunderstand.
Ian