[Bug fortran/13249] [gfortran] Error when using COMMON

dann at godzilla dot ics dot uci dot edu gcc-bugzilla@gcc.gnu.org
Mon May 17 00:22:00 GMT 2004


------- Additional Comments From dann at godzilla dot ics dot uci dot edu  2004-05-16 01:55 -------
Corrected testcase: 

      MODULE mymod
        
      TYPE :: mymod_type
        INTEGER          field1                                             
        INTEGER          field2
      END TYPE
      TYPE (mymod_type), DIMENSION(:), ALLOCATABLE :: AN_EXAMPLE
      END MODULE mymod
   
      SUBROUTINE mytest (MYARG)               
      USE mymod;
      INTEGER :: MYARG
      COMMON /AN_EXAMPLE/  Rx, Ry, Rz
      END


Fails with gfortran: 
 In file PR13249.f90:13
      COMMON /AN_EXAMPLE/  Rx, Ry, Rz
                       1
Error: Cannot change attributes of USE-associated symbol at (1)

It compiles with the  Intel and PGI compilers.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13249



More information about the Gcc-bugs mailing list