From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AAF4B3939C30; Wed, 14 Sep 2022 06:41:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AAF4B3939C30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663137704; bh=N9F1WQug1zU0pIKD0URvScK1ijU7QmZOwFAi3bUwJT4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=J1AUsBGUWqGelke81JljflONRuy3RliGjpIxHL29IzSzSYzlMr6htyLI1nj0r02Us +QdgyhhxhDOy6g+MRSbgHVtrL/BAeD8hqcIrhKjhZGSuDXsVru8aVM2AOiqd76p4UV yp/1qSCzfYHRcGpmvOzCJOf2giRy6FF6oO2MSf5c= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106934] [10/11/12/13 Regression] ICE: verify_gimple failed since r9-5682-gef310a95a934d0f3 Date: Wed, 14 Sep 2022 06:41:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-checking, ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status component keywords 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106934 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Component|fortran |tree-optimization Keywords| |ice-checking, | |ice-on-valid-code --- Comment #2 from Richard Biener --- We are folding __builtin_memcpy (&transfer.0, &b, 1); to _12 =3D BIT_FIELD_REF ; MEM[(c_char * {ref-all})&transfer.0] =3D _12; where update_address_taken rewrites _12 =3D MEM[(c_char * {ref-all}&b]; to the BIT_FIELD_REF, exactly because the memory reference references QImode but the variable has HImode so we cannot use a VIEW_CONVERT to pun. The logic in update-address-taken doesn't match that of the verifier here, the variable is unit-size align:16 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff653e0a8 precision:1 min max pointer_to_this > used unsigned HI t.f90:3:18 size unit-s= ize align:16 warn_if_not_align:0 context > the intent of the verifier is to avoid the need to deal with referencing padding in registers. I'm not sure we absolutely have to uphold that but a workaround would be to V_C_E the non-mode-precision operand to a mode-precision operand and perform the BIT_FIELD_REF on that instead. Note we don't seem to have any issue with non-integral typed non-mode-preci= sion operands here which is a bit inconsistent. That was changed with the fix for PR88739.=