From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 354083858C27; Mon, 18 Jul 2022 08:10:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 354083858C27 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/106331] [12/13 Regression] Whole array assignment of empty string segfaults with -Og Date: Mon, 18 Jul 2022 08:10:38 +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: 12.1.0 X-Bugzilla-Keywords: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords cc cf_gcctarget 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: Mon, 18 Jul 2022 08:10:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106331 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code CC| |rguenth at gcc dot gnu.org Target| |x86_64-*-* --- Comment #3 from Richard Biener --- Confirmed - we get # S.0_3 =3D PHI <1(2), S.0_7(4)> if (S.0_3 > 2) goto ; [33.33%] else goto ; [66.67%] _1 =3D S.0_3 + -1; _2 =3D &a[_1]; __builtin_memset (_2, 32, 24); S.0_7 =3D S.0_3 + 1; goto ; [100.00%] but somehow we fail to see that while the first [24] is 16 byte aligned, the second is not: .L4: leaq -3(%rax,%rax,2), %rcx leaq 0(,%rcx,8), %rdx leaq -56(%rsp,%rdx), %rdx movdqa .LC0(%rip), %xmm0 movaps %xmm0, (%rdx) movabsq $2314885530818453536, %rsi movq %rsi, 16(%rdx) addq $1, %rax .L3: cmpq $2, %rax jle .L4 we shouldn't have used movaps %xmm0, (%rdx) here. Probably middle-end but bisection will show.=