From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 59FFA3858423; Fri, 17 Mar 2023 09:33:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59FFA3858423 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1679045587; bh=sJ8cupmQkzD8GvI02PB4yaIkbBWQICsDaWe423fVHX0=; h=From:To:Subject:Date:From; b=QaDxEhUe4UUxM/nymFewCmBiODshpcef9aQaSLROZ9edS9ooYjxFCY10+gmzUu51s ALxRbrbEXgD86oij/ZyPecrdOcIkFgNpBL8KoXOaLjr7c2p2t0B/dG4QcdlrdHJaQ2 CbSYW6ZdLmbPKhfBVeGpRYI0LfB0fO5gp7kJcaPs= From: "urbanjost at comcast dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/109171] New: initialization using %re causes segfault, as an assignment does not Date: Fri, 17 Mar 2023 09:33:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: urbanjost at comcast dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D109171 Bug ID: 109171 Summary: initialization using %re causes segfault, as an assignment does not Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: urbanjost at comcast dot net Target Milestone: --- program boom implicit none complex, save, target :: a(4) #ifdef INITIALIZE real, pointer :: p(:) =3D> a(1:3:2)%re #else real, pointer :: p(:)=20 p =3D> a(1:3:2)%re #endif a =3D [(1., 0.), (2., 0.), (3., 0.), (4., 0)] print *, p end program boom when compiles with "gfortran" and so using the assignment it works; when compiled with "gfortran -DINITIALIZE" it compiles but gets a segfault on execution.=