This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] for PRs 27639 and 26719


On 6/25/06, Eric Botcazou <ebotcazou@adacore.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):

Index: tree-ssa-loop-niter.c
===================================================================
--- 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))
     return true;

+  /* 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))
     return true;


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.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]