From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6441 invoked by alias); 14 Oct 2004 19:18:40 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6399 invoked by uid 48); 14 Oct 2004 19:18:33 -0000 Date: Thu, 14 Oct 2004 19:18:00 -0000 Message-ID: <20041014191833.6397.qmail@sourceware.org> From: "ebotcazou at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041002054828.17793.pinskia@gcc.gnu.org> References: <20041002054828.17793.pinskia@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/17793] [4.0 Regression] Ada bootstrap failure X-Bugzilla-Reason: CC X-SW-Source: 2004-10/txt/msg01987.txt.bz2 List-Id: ------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-10-14 19:18 ------- > The integer_type's are not compatible by defined by the front-end, why? The front-end generates a correct tree (with a NOP_EXPR) but it is stripped by the gimplifier: /* Strip away as many useless type conversions as possible at the toplevel. */ STRIP_USELESS_TYPE_CONVERSION (*expr_p); A quick fix is therefore the following: Index: gimplify.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/gimplify.c,v retrieving revision 2.82 diff -u -p -r2.82 gimplify.c --- gimplify.c 30 Sep 2004 01:22:05 -0000 2.82 +++ gimplify.c 14 Oct 2004 15:24:57 -0000 @@ -4156,7 +4156,7 @@ gimplify_one_sizepos (tree *expr_p, tree static bool cpt_same_type (tree a, tree b) { - if (lang_hooks.types_compatible_p (a, b)) + if (a == b || lang_hooks.types_compatible_p (a, b)) return true; /* ??? The C++ FE decomposes METHOD_TYPES to FUNCTION_TYPES and doesn't @@ -4179,7 +4179,8 @@ cpt_same_type (tree a, tree b) if (POINTER_TYPE_P (a) && POINTER_TYPE_P (b)) return cpt_same_type (TREE_TYPE (a), TREE_TYPE (b)); - return false; + /* STRIP_USELESS_TYPE_CONVERSION uses this predicate. */ + return tree_ssa_useless_type_conversion_1 (a, b); } /* Check for some cases of the front end missing cast expressions. However I'm not sure it is not papering over something else. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot gnu dot | |org Component|ada |middle-end GCC target triplet|powerpc-darwin, powerpc- |powerpc-*, sparc-* |linux | Summary|[4.0 Regression] Ada front- |[4.0 Regression] Ada |end causing bootstrap |bootstrap failure |failure | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17793