[PATCH, gfortran] Re: Cray Pointers

Jack Howarth howarth@bromo.msbb.uc.edu
Sun Aug 14 22:02:00 GMT 2005


Asher,
    I built gcc main branch (4.1) cvs today with your cp_patch_8_12a.diff
applied on MacOS X 10.4.2. The resulting gfortran seems to pass the
cray_pointers_1.f90, cray_pointers_2.f90 and loc_1.f90 testsuite tests
when manually compiled and executed at various optimization levels.
However I find that the cray_pointers_3.f90 test doesn't compile...

gfortran -fcray-pointer cray_pointers_3.f90

...gives...

 In file cray_pointers_3.f90:8

  pointer (ipt, array) ! { dg-error "integer" }
             1
Error: Cray pointer at (1) must be an integer.
 In file cray_pointers_3.f90:15

  pointer (ipt2, array) ! { dg-error "multiple" }
               1
Error: Cray Pointee at (1) appears in multiple pointer() statements.
 In file cray_pointers_3.f90:24

  array = 0    ! { dg-error "Vector assignment" }
      1
Error: Vector assignment to assumed-size Cray Pointee at (1) is illegal.
 In file cray_pointers_3.f90:28

  pointer (ipt, ipt) ! { dg-error "POINTER attribute" }
              1
Error: CRAY POINTER attribute conflicts with CRAY POINTEE attribute at (1)
 In file cray_pointers_3.f90:34

  real array(10)      ! { dg-error "Duplicate array" }  
               1
Error: Duplicate array spec for Cray pointee at (1).
 In file cray_pointers_3.f90:39

  pointer (ipt, array(7))  ! { dg-error "Duplicate array" }
                       1
Error: Duplicate array spec for Cray pointee at (1).
 In file cray_pointers_3.f90:44

  pointer (                  ! { dg-error "variable name" }
          1
Error: Expected variable name at (1)
 In file cray_pointers_3.f90:45

  pointer (ipt               ! { dg-error "Expected" }
             1
Error: Expected "," at (1)
 In file cray_pointers_3.f90:46

  pointer (ipt,              ! { dg-error "variable name" }
              1
Error: Expected variable name at (1)
 In file cray_pointers_3.f90:47

  pointer (ipt,a1            ! { dg-error "Expected" }
                1
Error: Expected ")" at (1)
 In file cray_pointers_3.f90:48

  pointer (ipt,a2),          ! { dg-error "Expected" }
                  1
Error: Expected '(' at (1)
 In file cray_pointers_3.f90:49

  pointer (ipt,a3),(         ! { dg-error "variable name" }
                   1
Error: Expected variable name at (1)
 In file cray_pointers_3.f90:50

  pointer (ipt,a4),(ipt2     ! { dg-error "Expected" }
                       1
Error: Expected "," at (1)
 In file cray_pointers_3.f90:51

  pointer (ipt,a5),(ipt2,    ! { dg-error "variable name" }
                        1
Error: Expected variable name at (1)
 In file cray_pointers_3.f90:52

  pointer (ipt,a6),(ipt2,a7  ! { dg-error "Expected" }
                          1
Error: Expected ")" at (1)
 In file cray_pointers_3.f90:61

  pointer (ipt, array)    ! { dg-error "DUMMY" }
              1
Error: CRAY POINTEE attribute conflicts with DUMMY attribute at (1)
 In file cray_pointers_3.f90:62

  pointer (dim, elt1)     ! { dg-error "DIMENSION" }
          1
Error: CRAY POINTER attribute conflicts with DIMENSION attribute at (1)
 In file cray_pointers_3.f90:63

  pointer (f90ptr, elt2)  ! { dg-error "POINTER" }
          1
Error: CRAY POINTER attribute conflicts with POINTER attribute at (1)
 In file cray_pointers_3.f90:64

  pointer (ipt, f90ptr)   ! { dg-error "POINTER" }
              1
Error: CRAY POINTEE attribute conflicts with POINTER attribute at (1)
 In file cray_pointers_3.f90:65

  pointer (f90targ, elt3) ! { dg-error "TARGET" }
          1
Error: CRAY POINTER attribute conflicts with TARGET attribute at (1)
 In file cray_pointers_3.f90:66

  pointer (ipt, f90targ)  ! { dg-error "TARGET" }
              1
Error: CRAY POINTEE attribute conflicts with TARGET attribute at (1)

and while I can compile  loc_2.f90 with...

gfortran  loc_2.f90

...the resulting binary seems to generate an error...

[Jack-Howarths-Computer:~/Desktop] howarth% ./a.out
       12496

Any idea why these two problems are occuring in the testsuite?
               Jack



More information about the Fortran mailing list