From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B4CBA3857C4A; Sat, 15 Aug 2020 07:41:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4CBA3857C4A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1597477278; bh=rw6Mgkx6X7c5VVmy4QoeoWrorNT4EaSZ9Q0sU8t9WkE=; h=From:To:Subject:Date:From; b=h1HUf/8z4JX4PDrP9YLIeZGvljH3Ygim4XqPmMGOQNOctIyob3OosjGB65lQAh10o 5JFsA2uCPt47EFE0IxZN7RM0mvU14zlUDfgYTTQo9CWc6LNspAOE/izAWhF6Nnicnn qFlLQ5/n7DXjzekL4DD1LDIzc6vhlJEEPSDgRW0Y= From: "shenpo.dong@compiler-dev.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/96624] New: A segment error occurred when using the reshape function result to assign a variable Date: Sat, 15 Aug 2020 07:41:18 +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: 10.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: shenpo.dong@compiler-dev.com 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 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: Sat, 15 Aug 2020 07:41:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96624 Bug ID: 96624 Summary: A segment error occurred when using the reshape function result to assign a variable Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: shenpo.dong@compiler-dev.com Target Milestone: --- program test integer :: a(2,0) a =3D reshape([1,2,3,4], [2,0]) print *,a end with gcc version 10.1.0 (Ubuntu 10.1.0-2ubuntu1~18.04) Target: aarch64-linux-gnu i get this message: Program received signal SIGSEGV: Segmentation fault - invalid memory refere= nce. Backtrace for this error: #0 0xffff81755e5f #1 0xffff81754ea7 #2 0xffff818dd687 #3 0xaaaad5c199cc #4 0xaaaad5c19b1f #5 0xffff816006df #6 0xaaaad5c19883 Segmentation fault (core dumped) But if assign values when declare them=EF=BC=8Cit is correct integer :: a(2,0) =3D reshape([1,2,3,4], [2,0]) print *,a end the result is a blank line=