From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ADD6B3851C0C; Wed, 17 Jun 2020 09:04:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ADD6B3851C0C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592384657; bh=bb60y8beby8DOLJV8HP8a9JpuWM3kzeFYmp1CpiYJHI=; h=From:To:Subject:Date:From; b=rJaMWx/hI3G+H+Va6BJG/ZM3kmsJGAcrO1aRagf2raQuMlBTWvab6P35Q3uP3agbq e1WG80jVCx2W48z6aHrqkmgpjXrlGs4o3g6Irmr3elw83yX6bmS6FX0TwCHpZ6gPnq bMiwnVA0EdvdzUb3t1qbUnTtCttKBvTuRVaCDnFc= From: "peng.wang@compiler-dev.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/95718] New: Wrong pointer associated status without initialization Date: Wed, 17 Jun 2020 09:04:17 +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: peng.wang@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: Wed, 17 Jun 2020 09:04:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95718 Bug ID: 95718 Summary: Wrong pointer associated status without initialization Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: peng.wang@compiler-dev.com Target Milestone: --- consider the code below: **** program test integer,pointer::ptr integer,pointer::ptr1 integer,pointer::ptr2 integer,pointer::ptr3 integer,pointer::ptr4 print*,associated(ptr),'associated(ptr)' print*,associated(ptr1),'associated(ptr1)' print*,associated(ptr2),'associated(ptr2)' print*,associated(ptr3),'associated(ptr3)' print*,associated(ptr4),'associated(ptr4)' end program test **** #gfortran -std=3Df2008 test.f90 ; ./a.out T associated(ptr) F associated(ptr1) T associated(ptr2) F associated(ptr3) T associated(ptr4) the associated status of the pointers is uncertain after the execution abov= e. according to F2008 draft 16.5.2.7, the associated status of the pointer sho= uld be F in the case above. this is the options given when GCC was configured: # gfortran -v Using built-in specs. COLLECT_GCC=3Dgfortran COLLECT_LTO_WRAPPER=3D/usr/local/gcc/libexec/gcc/x86_64-pc-linux-gnu/10.1.0= /lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../configure --prefix=3D/usr/local/gcc -enable-checking=3D= release -enable-languages=3Dc,fortran -disable-bootstrap -disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.1.0 (GCC)=