From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16980 invoked by alias); 6 Sep 2004 12:21:49 -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 16965 invoked from network); 6 Sep 2004 12:21:46 -0000 Received: from unknown (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org with SMTP; 6 Sep 2004 12:21:46 -0000 Received: from camelot.ms.mff.cuni.cz (kampanus.ms.mff.cuni.cz [195.113.18.107]) by nikam.ms.mff.cuni.cz (Postfix) with SMTP id 772984DD40; Mon, 6 Sep 2004 14:21:46 +0200 (CEST) Received: by camelot.ms.mff.cuni.cz (sSMTP sendmail emulation); Mon, 6 Sep 2004 14:21:47 +0200 Date: Mon, 06 Sep 2004 12:21:00 -0000 From: Jan Hubicka To: Jan Hubicka Cc: Diego Novillo , Graham Stott , gcc-bugs@gcc.gnu.org, Zdenek Dvorak Subject: Re: java/io/natFile.cc:106: internal compiler error: verify_ssa failed. Message-ID: <20040906122147.GF9488@kam.mff.cuni.cz> References: <413B2322.8030500@btinternet.com> <1094395823.29000.67.camel@localhost.localdomain> <413B2C87.1020406@btinternet.com> <413B4A72.2080404@btinternet.com> <1094406866.29000.75.camel@localhost.localdomain> <20040906084700.GG31593@kam.mff.cuni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040906084700.GG31593@kam.mff.cuni.cz> User-Agent: Mutt/1.3.28i X-SW-Source: 2004-09/txt/msg00448.txt.bz2 List-Id: > > On Sun, 2004-09-05 at 13:18, Graham Stott wrote: > > > Diego, > > > > > > > Diego Novillo wrote: > > > > > > > >> Can you reproduce this with -fno-ivopts? > > > > > > > no it compiles fine with -fno-ivopts > > > > > Then Zdenek needs to fix this problem as well. Honza, since Zdenek is > > out could you please take care of this problem and the other one I > > reported earlier today? > > > > http://gcc.gnu.org/ml/gcc-bugs/2004-09/msg00419.html > > http://gcc.gnu.org/ml/gcc-patches/2004-09/msg00523.html > > Yes, I am looking into it. Hi, I am testing the attached patch. So far I found two problems: Java does not initialize the unsigned_type_node but it seems to be sanier to not use the frontend types anyway so I repleaced them with intSI/intDI nodes. Other problem is in cost computing code that needs to put in fake DECL_RTL in order to expand the expression and compute the cost. THe failing case is when address is taken of something and Zdenek just puts in the DECL_RTL. I intend to commit the patches if the testing suceeds to unbreak the bootstrap but I will send proper email to patches list about this. This is just in case someone sees something obvious with it. Index: tree-ssa-loop-ivopts.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-ivopts.c,v retrieving revision 2.2 diff -c -3 -p -r2.2 tree-ssa-loop-ivopts.c *** tree-ssa-loop-ivopts.c 5 Sep 2004 15:24:15 -0000 2.2 --- tree-ssa-loop-ivopts.c 6 Sep 2004 12:15:37 -0000 *************** add_standard_iv_candidates (struct ivopt *** 1561,1574 **** { /* Add 0 + 1 * iteration candidate. */ add_candidate (data, ! fold_convert (unsigned_type_node, integer_zero_node), ! fold_convert (unsigned_type_node, integer_one_node), true, NULL); /* The same for a long type. */ add_candidate (data, ! fold_convert (long_unsigned_type_node, integer_zero_node), ! fold_convert (long_unsigned_type_node, integer_one_node), true, NULL); } --- 1561,1574 ---- { /* Add 0 + 1 * iteration candidate. */ add_candidate (data, ! fold_convert (unsigned_intSI_type_node, integer_zero_node), ! fold_convert (unsigned_intSI_type_node, integer_one_node), true, NULL); /* The same for a long type. */ add_candidate (data, ! fold_convert (unsigned_intDI_type_node, integer_zero_node), ! fold_convert (unsigned_intDI_type_node, integer_one_node), true, NULL); } *************** seq_cost (rtx seq) *** 1883,1888 **** --- 1883,1906 ---- return cost; } + /* Produce DECL_RTL for object obj so it looks like it is stored in memory. */ + static rtx + produce_memory_decl_rtl (tree obj, int *regno) + { + rtx x; + if (!obj) + abort (); + if (TREE_STATIC (obj) || DECL_EXTERNAL (obj)) + { + const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (obj)); + x = gen_rtx_SYMBOL_REF (Pmode, name); + } + else + x = gen_raw_REG (Pmode, (*regno)++); + + return gen_rtx_MEM (DECL_MODE (obj), x); + } + /* Prepares decl_rtl for variables referred in *EXPR_P. Callback for walk_tree. DATA contains the actual fake register number. */ *************** prepare_decl_rtl (tree *expr_p, int *ws, *** 1895,1900 **** --- 1913,1929 ---- switch (TREE_CODE (*expr_p)) { + case ADDR_EXPR: + for (expr_p = &TREE_OPERAND (*expr_p, 0); + (handled_component_p (*expr_p) + || TREE_CODE (*expr_p) == REALPART_EXPR + || TREE_CODE (*expr_p) == IMAGPART_EXPR); + expr_p = &TREE_OPERAND (*expr_p, 0)); + obj = *expr_p; + if (DECL_P (obj)) + x = produce_memory_decl_rtl (obj, regno); + break; + case SSA_NAME: *ws = 0; obj = SSA_NAME_VAR (*expr_p); *************** prepare_decl_rtl (tree *expr_p, int *ws, *** 1912,1929 **** break; if (DECL_MODE (obj) == BLKmode) ! { ! if (TREE_STATIC (obj) ! || DECL_EXTERNAL (obj)) ! { ! const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (obj)); ! x = gen_rtx_SYMBOL_REF (Pmode, name); ! } ! else ! x = gen_raw_REG (Pmode, (*regno)++); ! ! x = gen_rtx_MEM (DECL_MODE (obj), x); ! } else x = gen_raw_REG (DECL_MODE (obj), (*regno)++); --- 1941,1947 ---- break; if (DECL_MODE (obj) == BLKmode) ! x = produce_memory_decl_rtl (obj, regno); else x = gen_raw_REG (DECL_MODE (obj), (*regno)++);