From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3546 invoked by alias); 11 Dec 2010 09:59:44 -0000 Received: (qmail 3531 invoked by uid 22791); 11 Dec 2010 09:59:43 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_FD,TW_IB X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 11 Dec 2010 09:59:37 +0000 Received: by wyb40 with SMTP id 40so4488850wyb.20 for ; Sat, 11 Dec 2010 01:59:35 -0800 (PST) Received: by 10.216.161.201 with SMTP id w51mr2019473wek.88.1292061575367; Sat, 11 Dec 2010 01:59:35 -0800 (PST) Received: from [192.168.2.99] (cpc2-cmbg8-0-0-cust61.5-4.cable.virginmedia.com [82.6.108.62]) by mx.google.com with ESMTPS id b47sm1947167wer.38.2010.12.11.01.59.34 (version=SSLv3 cipher=RC4-MD5); Sat, 11 Dec 2010 01:59:34 -0800 (PST) Message-ID: <4D035145.7030703@gmail.com> Date: Sat, 11 Dec 2010 09:59:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: "gcc@gcc.gnu.org" , GCC Java Subject: Re: Tree checking failure in jc1 References: <4D02925F.2030900@gmail.com> In-Reply-To: <4D02925F.2030900@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2010-12/txt/msg00002.txt.bz2 On 10/12/2010 20:49, Dave Korn wrote: > I found a couple of new FAILs in my latest libjava testrun: > >> FAIL: newarray_overflow -O3 compilation from source >> FAIL: newarray_overflow -O3 -findirect-dispatch compilation from source > > These turn out to be tree checking failures: > >> In file included from :3:0: >> newarray_overflow.java:20:0: internal compiler error: tree check: expected class >> 'type', have 'declaration' (function_decl) in put_decl_node, at java/lang.c:405 This turned out to be a second bug, triggered by -fdump-tree-all attempting to output some line of mangled gimple. Without that flag, or ... > put_decl_node (TREE_CODE (DECL_CONTEXT (node)) == FUNCTION_DECL > ? DECL_CONTEXT (node) > : TYPE_NAME (DECL_CONTEXT (node)), > verbosity); ... with the suggested fix, compilation proceeds to the site of the actual crash that occurred in the testsuite run: a segfault in gimple.c#walk_gimple_op(): > Program received signal SIGSEGV, Segmentation fault. > 0x007cfdbe in walk_gimple_op (stmt=0x7fe106e0, callback_op=0x4a0ef0 .265801>, wi=0x326c554) at /gnu/gcc/gcc/gcc/gimple.c:2841 > 2841 return !AGGREGATE_TYPE_P (type); > (gdb) call debug_gimple_stmt (stmt) > newarray_overflow.int_check.__builtin_prefetch (D.1284_85, 0, ); > > (gdb) I think this is the same as PR29710(*) "gnat ICEs on -fprefetch-loop-arrays -O1", so I'll put the rest of my findings there. Note that weird missing third argument: it turns out that integer_three_node hasn't been initialised at the time that issue_prefetch_ref() attempts to pass it to gimple_build_call(). cheers, DaveK -- (*) - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29710