From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2568E3864877; Tue, 11 Oct 2022 13:04:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2568E3864877 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665493476; bh=FV8mo9hLWOOj1wqd8fp4YbJLJtTPnnjdNtS8EjsoO7M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UDuqoIEZcM1qtCIBA7HelBPeG9dn1cZ+se5RCiNY0SV2AVxEQJhQJGEhDquLUcPPN OFK5pOE2f3vuSW1+Lca0N1Tzn3t7AkQtN6atARp9ropOgo70d7sPM8hrt/u+hO7UmA qRUQUuWOM04tAGW4xwIcgg3QuEsfywEVl7xpihw8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106331] [10/11 Regression] Whole array assignment of empty string segfaults with -Og since r12-2633-ge5e164effa30fd2b Date: Tue, 11 Oct 2022 13:04:35 +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.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106331 --- Comment #13 from CVS Commits --- The releases/gcc-11 branch has been updated by Richard Biener : https://gcc.gnu.org/g:90d3b4dd84c08cc134578397d9c6b30b7dc4b440 commit r11-10305-g90d3b4dd84c08cc134578397d9c6b30b7dc4b440 Author: Richard Biener Date: Tue Jul 19 09:57:22 2022 +0200 middle-end/106331 - fix mem attributes for string op arguments get_memory_rtx tries hard to come up with a MEM_EXPR to record in the memory attributes but in the last fallback fails to properly account for an unknown offset and thus, as visible in this testcase, incorrect alignment computed from set_mem_attributes. The following rectifies both parts. PR middle-end/106331 * builtins.c (get_memory_rtx): Compute alignment from the original address and set MEM_OFFSET to unknown when we create a MEM_EXPR from the base object of the address. * gfortran.dg/pr106331.f90: New testcase. (cherry picked from commit e4ff11a8f2e80adb8ada69bf35ee6a1ab18a9c85)=