public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/99651] New: Cannot change attributes of USE-associated intrinsic
@ 2021-03-18 17:49 aserranot at aemet dot es
  2021-03-18 20:16 ` [Bug fortran/99651] " burnus at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: aserranot at aemet dot es @ 2021-03-18 17:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99651

            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=50424&action=edit
Source files to reproduce the problem

When I make a minimal example, the problem does not appear. So, I have taken 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 Université
du Québec à Montréal) and it seems that when I erase the corresponding 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=bounds -fcheck=all -g -O0 
-Wall   -c f_udunits_2.f90

gfortran -J. -cpp -fno-realloc-lhs -fopenmp -fcheck=bounds -fcheck=all -g -O0 
-Wall   -c gfortran_bug_example.f90 

In my system, the output from the last command is:
gfortran_bug_example.f90:41:53:

   41 |     type(typeNode),   pointer       :: Next => null()
      |                                                     1
Error: No se pueden cambiar los atributos del símbolo asociado con USE null en
(1)
gfortran_bug_example.f90:45:45:

   45 |     type(typeNode), pointer :: Head => null()
      |                                             1
Error: No se pueden cambiar los atributos del símbolo asociado con USE null en
(1)
gfortran_bug_example.f90:46:45:

   46 |     type(typeNode), pointer :: Last => null()
      |                                             1
Error: No se pueden cambiar los atributos del símbolo asociado con USE null en
(1)
gfortran_bug_example.f90:62:30:

   62 |         class(typeFieldsList)   :: FieldsList
      |                              1
Error: Derived type ‘typefieldslist’ at (1) is being used before it is defined
gfortran_bug_example.f90:66:30:

   66 |         class(typeFieldsList)               :: Fields
      |                              1
Error: Derived type ‘typefieldslist’ at (1) is being used before it is defined
gfortran_bug_example.f90:67:25:

   67 |         class(typeField),       intent(in)  :: Field
      |                         1
Error: Derived type ‘typefield’ at (1) is being used before it is defined
gfortran_bug_example.f90:71:30:

   71 |         class(typeFieldsList),  target              :: Fields
      |                              1
Error: Derived type ‘typefieldslist’ at (1) is being used before it is defined
gfortran_bug_example.f90:73:25:

   73 |         class(typeField), pointer     :: Ptr
      |                         1
Error: Derived type ‘typefield’ at (1) is being used before it is defined

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-03 13:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 17:49 [Bug fortran/99651] New: Cannot change attributes of USE-associated intrinsic aserranot at aemet dot es
2021-03-18 20:16 ` [Bug fortran/99651] " burnus at gcc dot gnu.org
2021-03-18 20:16 ` burnus at gcc dot gnu.org
2021-03-18 20:25 ` burnus at gcc dot gnu.org
2021-03-19  8:51 ` burnus at gcc dot gnu.org
2021-03-26  7:40 ` cvs-commit at gcc dot gnu.org
2021-03-29  9:47 ` cvs-commit at gcc dot gnu.org
2021-05-03 13:20 ` burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).