From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 46228383F85E; Tue, 16 Jun 2020 07:30:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46228383F85E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592292602; bh=deJNn8BcF8+hkkT2H/z9+P2jmojtiB3BOHGH260Q6Yk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vyaVG08TQBPhqaLH+XvIJ5nOiHItH4Vtc5ZCaFFEbDtnKlU5keWsV4tvZMJ+ObdhE 3NqKAX4DW5xcFei1+n+7BZYQ5B7YibNy3xg0GSmC96+YOGoIIqRmmdCoHSYN+tPZXD A0+kpGkRo3NDwKWrlo0sbmnHZbpz5+5oWeCb04R8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/95690] [11 Regression] ICE in set_mem_attributes_minus_bitpos, at emit-rtl.c:2092 Date: Tue, 16 Jun 2020 07:30:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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: Tue, 16 Jun 2020 07:30:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95690 --- Comment #3 from Richard Biener --- (gdb) p t $1 =3D (gdb) p debug_generic_expr (t) ((erfc)) so that's the DECL_INITIAL of a CONST_DECL. The CONST_DECL is built that way by the FE: 8833 /* Create a temporary var to hold the value. */ 8834 if (TREE_CONSTANT (se->expr)) 8835 { 8836 tree tmp =3D se->expr; 8837 STRIP_TYPE_NOPS (tmp); 8838 var =3D build_decl (input_location, 8839 CONST_DECL, NULL, TREE_TYPE (tmp)); 8840 DECL_INITIAL (var) =3D tmp; and the middle-end doesn't really expect PAREN_EXPRs. I don't see any stripping of other codes on the path to the ICE so I'll amend what is alrea= dy there. But IMHO build_constant_desc shouldn't pass the constant expression to be used as MEM_EXPR, instead passing down the type looks more appropriate and future-proof...=