From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C97303857B86; Wed, 27 Jul 2022 14:35:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C97303857B86 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106449] ICE in #pragma omp parallel for simd since r6-4544-ge01d41e553aae245 Date: Wed, 27 Jul 2022 14:35:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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, 27 Jul 2022 14:35:29 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106449 --- Comment #6 from Tobias Burnus --- Comment on attachment 53362 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53362 gcc13-pr106449.patch > + t =3D fold_convert (sizetype, fd->loops[i + 1].n1); > + t =3D fold_build_pointer_plus (t2, t); I think the first line is not needed, given that fold_build_pointer_plus_loc has: return fold_build2_loc (loc, POINTER_PLUS_EXPR, TREE_TYPE (ptr), ptr, convert_to_ptrofftype_loc (loc, off)); and the convert_to_ptrofftype_loc does: if (ptrofftype_p (TREE_TYPE (off))) return off; return fold_convert_loc (loc, sizetype, off); where the last line matches your first line. Hence, just calling t =3D fold_build_pointer_plus (t2, fd->loops[i + 1].n1); should gives the same result and is more compact (avoids a line and a 2-character indent).=