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

            Bug ID: 63529
           Summary: Bad error and ICE with Cray Pointers in Modules
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: russelldub at gmail dot com

Consider the following "cray_ptr_issue1.f90":

MODULE PTR_MOD
  IMPLICIT NONE
  REAL :: ptee1(*)
  POINTER (ptr1, ptee1)
END MODULE PTR_MOD
PROGRAM MAIN
  USE PTR_MOD
  IMPLICIT NONE
  WRITE(*,*) "Hello, world!"
END PROGRAM MAIN

> gfortran -fcray-pointer cray_ptr_issue1.f90
cray_ptr_issue.f90:7.6:

  USE PTR_MOD
      1
Error: Assumed size array at (1) must be a dummy argument

Scratch head.  Change "REAL :: ptee1(*)" to REAL :: ptee1(10)".

> gfortran -fcray-pointer cray_ptr_issue2.f90
f951: internal compiler error: backend decl for module variable ptr1 already
exists
0x5fd8f8 gfc_create_module_variable
        ../../gcc-4.9.0/gcc/fortran/trans-decl.c:4251
0x5ca9ab do_traverse_symtree
        ../../gcc-4.9.0/gcc/fortran/symbol.c:3575
0x5fe552 gfc_generate_module_vars(gfc_namespace*)
        ../../gcc-4.9.0/gcc/fortran/trans-decl.c:4694
0x5e0851 gfc_generate_module_code(gfc_namespace*)
        ../../gcc-4.9.0/gcc/fortran/trans.c:1946
0x59ea59 translate_all_program_units
        ../../gcc-4.9.0/gcc/fortran/parse.c:4522
0x59ea59 gfc_parse_file()
        ../../gcc-4.9.0/gcc/fortran/parse.c:4732
0x5db795 gfc_be_parse_file
        ../../gcc-4.9.0/gcc/fortran/f95-lang.c:188
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to