From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E6BE6384A40A; Wed, 10 Mar 2021 10:55:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6BE6384A40A From: "markus.weiland at ipp dot mpg.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/99514] New: incorrect Error: Threadprivate at (1) isn't SAVEd ( implicit save via DATA initialization ) Date: Wed, 10 Mar 2021 10:55: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: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: markus.weiland at ipp dot mpg.de 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 attachments.created 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, 10 Mar 2021 10:55:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99514 Bug ID: 99514 Summary: incorrect Error: Threadprivate at (1) isn't SAVEd ( implicit save via DATA initialization ) Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: markus.weiland at ipp dot mpg.de Target Milestone: --- Created attachment 50347 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D50347&action=3Dedit minimal example source code to reproduce the error Compiling the attached src file with: gfortran -c src/minimal.f90 -fopenmp gives the following error: src/minimal.f90:7:12: 7 | DATA NTest /1/ | 1 Error: Threadprivate at (1) isn't SAVEd while compiling with ifort ifort -c src/minimal.f90 -qopenmp works without error. I believe the ifort behavior is correct here, because the initialization of NTest via DATA causes an implicit save, which seems not to be identified by gfortran.=