This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/13249] Error when using COMMON


------- Additional Comments From dann at godzilla dot ics dot uci dot edu  2003-12-01 01:28 -------
With: gcc version 3.5-tree-ssa 20031130 (merged 20031123)

mymod.f90
      MODULE mymod
                                                                        
      TYPE :: mymod_type                                         
        INTEGER          field1
        INTEGER          field2
      END TYPE
      TYPE (mymod_type), DIMENSION(:), ALLOCATABLE :: AN_EXAMPLE
      END MODULE mymod

test.f90:
      SUBROUTINE mytest (MYARG)
      USE mymod;
      INTEGER :: MYARG
      COMMON /AN_EXAMPLE/
      END

> gfortran -c test.f90
  In file test.f90:4

      COMMON /AN_EXAMPLE/
                        1
Error: Cannot change attributes of USE-associated symbol at (1)

Intel's compiler compiles this code just fine. 
Code like this can be found in SPEC2000.

-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]