From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 652283937430; Wed, 18 Mar 2020 18:51:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 652283937430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584557501; bh=q0KGMHmhZDRJI6EbKKN2SMYuEVC/V075qi/tl5MOjTs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=t60ZcIinRDesbcdO++7faIJTHB0owsPsF93tMMPc0IK9jvE+Po3X4RduSqY0qpRgE uHhjuVOpxw/KJFf4ZTlT/HDHG0rI4HOAkixsGUawIVbq6LIiuLKGismJrvxMzJ2mY2 QFRrmi7YD1jLlOpGKTWWIAmhE0jnYQk2I7nBgW9M= From: "xerofoify at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/94217] [10 Regression] ICE in ipa_find_agg_cst_for_param, at ipa-prop.c:3467 since r10-7237-g4e3d3e40726e1b68 Date: Wed, 18 Mar 2020 18:51:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: xerofoify at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2020 18:51:41 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94217 --- Comment #3 from Nicholas Krause --- (In reply to Marek Polacek from comment #2) > (In reply to Nicholas Krause from comment #1) > > Hi Marin, > > I've not sure if this is correct but it does not ICE with this fix: > > tree off =3D fold_convert (ptr_type_node, op1); > > - return build_fold_addr_expr_loc > > - (loc, > > + return build1_loc > > + (loc, ADDR_EXPR, TREE_TYPE (op0), > > fold_build2 (MEM_REF, > > TREE_TYPE (TREE_TYPE (op0)), > > unshare_expr (op0), off)); > >=20 > > should actually be:=20=20 > > (EXPR_LOCATION(off), ADDR_EXPR, TREE_TYPE (op0), > > fold_build2 (MEM_REF, > > TREE_TYPE (TREE_TYPE (op0)), > > unshare_expr (op0), off)); >=20 > Huh? Why do you think that changing the location should fix the ICE?=20 > That's a completely random change that you never bothered to test, because > it doesn't fix the crash. Here is my exact output of testing the change: [xerofoify@gcc2-power8 bin]$ ./g++ star.ii -c -flto -O2 -o x.o && ./gcc -sh= ared x.o star.ii: In member function =E2=80=98int B< , , , , >::_S_key()=E2=80=99: star.ii:9:19: warning: no return statement in function returning non-void [-Wreturn-type] 9 | int _S_key() { } | ^ star.ii: In member function =E2=80=98int B< , , , , >::_M_insert_(int*, int*, _Arg&&, _NodeGen&)=E2=80= =99: star.ii:24:1: warning: no return statement in function returning non-void [-Wreturn-type] 24 | } | ^ If you look at the revision mentioned for this bug in gimple-fold.c here: tree off =3D fold_convert (ptr_type_node, op1); - return build_fold_addr_expr_loc - (loc, + return build1_loc + (loc, ADDR_EXPR, TREE_TYPE (op0), that's incorrect as loc is not the tree we want but off and from that the EXPR_LOCATION of that tree. Does that make more sense now?=