From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 36ABC3854835; Thu, 18 Mar 2021 17:49:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 36ABC3854835 From: "aserranot at aemet dot es" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/99651] New: Cannot change attributes of USE-associated intrinsic Date: Thu, 18 Mar 2021 17:49:58 +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.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aserranot at aemet dot es 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: Thu, 18 Mar 2021 17:49:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99651 Bug ID: 99651 Summary: Cannot change attributes of USE-associated intrinsic Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: aserranot at aemet dot es Target Milestone: --- Created attachment 50424 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D50424&action=3Dedit Source files to reproduce the problem When I make a minimal example, the problem does not appear. So, I have take= n my code and begun to simplify it while testing that, after each simplification, the problem remains. I use a fortran wrapper for the udunits by Michel Valin (Copyright Universi= t=C3=A9 du Qu=C3=A9bec =C3=A0 Montr=C3=A9al) and it seems that when I erase the cor= responding use statement and all the variables of a type defined in the udunits2 wrapper, = the problem disapears. So I think that the problem is triggered in some way by = that module. I attach my code and the module. To compile, issue the following commands in a directory where you have the files f_udunits_2.f90, f_udunits_2.inc and gfortran_bug_example.f90: gfortran -J. -cpp -fno-realloc-lhs -fopenmp -fcheck=3Dbounds -fcheck=3Dall = -g -O0=20 -Wall -c f_udunits_2.f90 gfortran -J. -cpp -fno-realloc-lhs -fopenmp -fcheck=3Dbounds -fcheck=3Dall = -g -O0=20 -Wall -c gfortran_bug_example.f90=20 In my system, the output from the last command is: gfortran_bug_example.f90:41:53: 41 | type(typeNode), pointer :: Next =3D> null() | 1 Error: No se pueden cambiar los atributos del s=C3=ADmbolo asociado con USE= null en (1) gfortran_bug_example.f90:45:45: 45 | type(typeNode), pointer :: Head =3D> null() | 1 Error: No se pueden cambiar los atributos del s=C3=ADmbolo asociado con USE= null en (1) gfortran_bug_example.f90:46:45: 46 | type(typeNode), pointer :: Last =3D> null() | 1 Error: No se pueden cambiar los atributos del s=C3=ADmbolo asociado con USE= null en (1) gfortran_bug_example.f90:62:30: 62 | class(typeFieldsList) :: FieldsList | 1 Error: Derived type =E2=80=98typefieldslist=E2=80=99 at (1) is being used b= efore it is defined gfortran_bug_example.f90:66:30: 66 | class(typeFieldsList) :: Fields | 1 Error: Derived type =E2=80=98typefieldslist=E2=80=99 at (1) is being used b= efore it is defined gfortran_bug_example.f90:67:25: 67 | class(typeField), intent(in) :: Field | 1 Error: Derived type =E2=80=98typefield=E2=80=99 at (1) is being used before= it is defined gfortran_bug_example.f90:71:30: 71 | class(typeFieldsList), target :: Fields | 1 Error: Derived type =E2=80=98typefieldslist=E2=80=99 at (1) is being used b= efore it is defined gfortran_bug_example.f90:73:25: 73 | class(typeField), pointer :: Ptr | 1 Error: Derived type =E2=80=98typefield=E2=80=99 at (1) is being used before= it is defined=