From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 856 invoked by alias); 20 Aug 2015 16:59:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 847 invoked by uid 89); 20 Aug 2015 16:59:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 20 Aug 2015 16:59:07 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 5B58E19F962; Thu, 20 Aug 2015 16:59:06 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-201.phx2.redhat.com [10.3.113.201]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7KGx5QY021841; Thu, 20 Aug 2015 12:59:05 -0400 Subject: Re: [PATCH] Fix middle-end/67133, part 1 To: Marek Polacek References: <55CE0A5A.4070802@redhat.com> <20150814195836.GB2093@redhat.com> <55CE5054.5080400@redhat.com> <20150814204649.GC2093@redhat.com> <55D21A8D.50004@redhat.com> <20150818194918.GB2729@redhat.com> <20150820103758.GE2729@redhat.com> <55D60338.2080306@redhat.com> <20150820165145.GF2729@redhat.com> Cc: Andreas Schwab , Richard Biener , GCC Patches From: Jeff Law Message-ID: <55D60759.6020107@redhat.com> Date: Thu, 20 Aug 2015 16:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150820165145.GF2729@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg01231.txt.bz2 On 08/20/2015 10:51 AM, Marek Polacek wrote: >> >> Based on the error, I suspect we've got a block ending with a GIMPLE_COND >> with no successors in the CFG. > > Except that I'm also seeing a different error: > /home/brq/mpolacek/gcc/libgo/go/text/template/exec.go:303:1: error: wrong > outgoing edge flags at end of bb 6 > We have this bb: > > : > # iftmp.1693_53 = PHI <0B(4)> > _54 = t_5(D)->Pipe; > GOTMP.163 = template.evalPipeline.pN19_text_template.state (s_7(D), dot, _31); > [return slot optimization] > dot = GOTMP.163; > _61 = __go_new (&__go_tdn_text_template..text_template.state, 64); > *_35 = *s_7(D); > # DEBUG newState => _35 > _35->tmpl = iftmp.1693_55; > GOTMP.166.value = dot; > _66 = __go_new (&__go_td_AN22_text_template.variable1e, 40); > SR.4170_67 = "$"; > SR.4171_68 = 1; > MEM[(struct .text/template.variable *)&GOTMP.166] = "$"; > MEM[(struct .text/template.variable *)&GOTMP.166 + 8B] = 1; > MEM[(struct .text/template.variable[1] *)_40][0] = GOTMP.166; > _35->vars.__values = _40; > _35->vars.__count = 1; > _35->vars.__capacity = 1; > _75 ={v} iftmp.1693_55->Tree; > __builtin_trap (); > _76 = _46->Root; > D.8248.__methods = > &__go_pimt__I25_.text_template_parse.treeFrpN24_text_template_parse.Treeee4_CopyFrN24_text_template_parse.Nodeee8_PositionFrN23_text_template_parse.Posee6_StringFrN6_stringee4_TypeFrN28_text_template_parse.NodeTypeeee__N28_text_template_parse.ListNode; > D.8248.__object = _47; > template.walk.pN19_text_template.state (_35, dot, D.8248); > return; > > and single_succ_p (bb) is not satisfied, so it must have more outgoing edges. > Not sure how can that happen... OK, iftmp.1693_55 is NULL (via the PHI). We inserted the trap. That looks reasonable. What does the CFG look like after splitting the block? There should be flags you can pass to get the edges & flags as part of the debugging output. My first guess would be some kind of exception handling edge, but I thought we avoided the transformation in that case. Hmm, maybe seeing the CFG with edges & flags at the time of trap insertion would be useful too. Jeff