From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64787 invoked by alias); 27 May 2015 12:17:18 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 64754 invoked by uid 48); 27 May 2015 12:17:13 -0000 From: "krebbel at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/66306] New: ICE in reload Date: Wed, 27 May 2015 12:17:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.8.5 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: krebbel at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg02225.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D66306 Bug ID: 66306 Summary: ICE in reload Product: gcc Version: 4.8.5 Status: UNCONFIRMED Severity: major Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: krebbel at gcc dot gnu.org Target Milestone: --- Created attachment 35635 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D35635&action=3Dedit Reduced testcase cc1plus -O1 t.c ... unsigned int linemap_position_for_loc_and_offset(unsigned int, unsigned in= t) t.c: In function =E2=80=98unsigned int linemap_position_for_loc_and_offset(= unsigned int, unsigned int)=E2=80=99:=20=20=20=20=20=20=20 t.c:20:1: internal compiler error: in subst_reloads, at reload.c:6308=20=20= =20=20=20=20=20=20=20=20=20 }=20 ... t.c.193r.ira: (insn 15 14 16 2 (parallel [ (set (reg:CCL1 33 %cc) (compare:CCL1 (plus:SI (reg:SI 46 [ D.1846 ]) (mem/j:SI (plus:DI (reg/f:DI 44 [ map.0 ]) (const_int 4 [0x4])) [0 map.0_1->ordinary+0= S4 A32])) (reg:SI 46 [ D.1846 ]))) (clobber (scratch:SI)) ]) t.c:15 276 {*addsi3_carry1_cconly} (expr_list:REG_DEAD (reg/f:DI 44 [ map.0 ]) (nil))) Insn 15 is supposed to match the following pattern. Admittedly a nasty combination of a commutative constraint modifier, matching constraints and a scratch register: (define_insn "*add3_carry1_cconly" [(set (reg CC_REGNUM) (compare (plus:GPR (match_operand:GPR 1 "nonimmediate_operand" "%0,d,0,0") (match_operand:GPR 2 "general_operand"=20=20=20= =20=20=20 "d,d,R,T")) (match_dup 1))) (clobber (match_scratch:GPR 0=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 "=3Dd,d,d,d"))] "s390_match_ccmode (insn, CCL1mode)" "@ alr\t%0,%2 alrk\t%0,%1,%2 al\t%0,%2 al\t%0,%2" [(set_attr "op_type" "RR,RRF,RX,RXY") (set_attr "cpu_facility" "*,z196,*,*") (set_attr "z10prop" "z10_super_E1,*,z10_super_E1,z10_super_E1")]) Reload ends up picking alternative 0 with swapped operands 1 and 2. Unfortunately the reload does not get a reload register assigned and theref= ore dies with the ICE. Reloads for insn # 15 Reload 0: reload_in (SI) =3D (mem/j:SI (plus:DI (reg/f:DI 1 %r1 [orig:44 ma= p.0 ] [44]) (const_int 4 [0x4])= ) [0 map.0_1->ordinary+0 S4 A32]) reload_out (SI) =3D (scratch:SI) GENERAL_REGS, RELOAD_OTHER (opnum =3D 0) reload_in_reg: (mem/j:SI (plus:DI (reg/f:DI 1 %r1 [orig:44 map.0 ] [44]) (const_int 4 [0x4])= ) [0 map.0_1->ordinary+0 S4 A32]) reload_out_reg: (scratch:SI) Regression hunt returns r186861 as the culprit (unfortunately one of my pat= ches :(. However, the patch only seems to reveal the problem since it changes wh= ich alternative gets chosen in that example. Even with the patch reverted the s= ame error appears when disabling/removing the other alternatives manually. E.g.= by limiting them to higher CPU levels: diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index a875eec..71b2e57 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -4592,7 +4592,7 @@ al\t%0,%2 al\t%0,%2" [(set_attr "op_type" "RR,RRF,RX,RXY") - (set_attr "cpu_facility" "*,z196,*,*") + (set_attr "cpu_facility" "*,z196,z196,z196") (set_attr "z10prop" "z10_super_E1,*,z10_super_E1,z10_super_E1")]) ; alr, alfi, slfi, al, aly, algr, algfi, slgfi, alg, alsi, algsi, alrk, al= grk, alhsik, alghsik >>From gcc-bugs-return-487386-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed May 27 12:18:52 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 75706 invoked by alias); 27 May 2015 12:18:51 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 71259 invoked by uid 48); 27 May 2015 12:18:47 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66304] Can't bootstrap on x86_64-linux-gnu with gcc 4.3.4 Date: Wed, 27 May 2015 12:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: version Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg02226.txt.bz2 Content-length: 409 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66304 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Version|5.1.0 |6.0 --- Comment #1 from Richard Biener --- I suppose you are reporting this against trunk.