This is the mail archive of the
mailing list for the GCC project.
Re: [patch] for PRs 27639 and 26719
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Eric Botcazou" <ebotcazou at adacore dot com>
- Cc: "Zdenek Dvorak" <rakdver at atrey dot karlin dot mff dot cuni dot cz>, gcc-patches at gcc dot gnu dot org, sebastian dot pop at cri dot ensmp dot fr, rguenther at suse dot de
- Date: Sun, 25 Jun 2006 12:52:37 +0200
- Subject: Re: [patch] for PRs 27639 and 26719
- References: <20060520192624.GA28713@atrey.karlin.mff.cuni.cz> <firstname.lastname@example.org>
On 6/25/06, Eric Botcazou <email@example.com> wrote:
> * tree-chrec.c (convert_affine_scev, chrec_convert_1,
> scev_direction): New functions.
> (chrec_convert): Changed to a wrapper over chrec_convert_1.
This breaks Ada on platforms that don't use ZCX exceptions (PR 27937).
The loop optimizer now generates IVs in subtypes instead of base types:
so I'm proposing to simply make nowrap_type_p return true for subtypes (i.e.
integer types that have a base type):
--- tree-ssa-loop-niter.c (revision 114982)
+++ tree-ssa-loop-niter.c (working copy)
@@ -1945,6 +1945,10 @@ nowrap_type_p (tree type)
&& !TYPE_UNSIGNED (type))
+ /* Assume that types don't wrap if they have a base type. */
+ if (TREE_CODE (type) == INTEGER_TYPE && TREE_TYPE (type))
+ return true;
if (POINTER_TYPE_P (type))
What do you think? Thanks in advance.
Uh, I would guess a safe answer from nowrap_type_p is false, so you
need to put some reasoning behind that (integer) types with a base
type do not wrap. Apart from that, you seem to rely on "optimization"
(nowrap_type_p returning true) to avoid the bug? This looks like a
workaround for a then latent bug.