Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Beginner
9 Views

unrecognized statement for pointer(p1, v1), (p2, v2)

Hi guys,

I am newly coming, and feel sorry for what I gonging to asking for, because this question may not belong to this forum. But I don't know where to ask for help.

I am using Ubuntu14.0/g++/g77 to make my project. Part of my old code as fallow:

        

!-------------------------------------------------------------------------------
        pointer (p_FX1, buf_FX1), (p_FY1, buf_FY1), (p_FX2, buf_FX2) 
        pointer (p_FY2, buf_FY2) 
        pointer (p_image3, buf_image3)
        pointer (p_image5, buf_image5)

        pointer (p_PreOrg, buf_PreOrg)
        pointer (p_SubOrg, buf_SubOrg)
 

        real*4 buf_FX1, buf_FY1        
        real*4 buf_FX2, buf_FY2
        integer*2 buf_image3        
        integer*2 buf_image5       
        integer*2 buf_PreOrg 
        integer*2 buf_SubOrg     

        ...

        p_PreOrg = malloc( ncol*nlin*2 )
        p_SubOrg = malloc( ncol*nlin*2 )

        call copy_image(image1, buf_PreOrg, ncol, nlin)

         ....

!--------------------------------------------------------------------------------

error as follow:

 Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
           pointer (p_FY2, buf_FY2) 
           1                        2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
           pointer (p_image3, buf_image3)
           1                             2
Unrecognized statement name at (1) and invalid form for assignment or statement-function definition at (2)
           pointer (p_image5, buf_image5)

How can fix this?

Thanks!

 

0 Kudos
1 Reply
Highlighted
Black Belt
9 Views

Declarations of the type  pointer (p_FY2, buf_FY2)  relate to what are often called Cray Pointers, which were supported in some Fortran compilers but were not part of the standard language. Furthermore, g77 is obsolete. Use gFortran instead, which would have told you

crayp.f:2:15:

        pointer (p_FY2, buf_FY2)
               1
Error: Cray pointer declaration at (1) requires -fcray-pointer flag

Your post is unrelated to Intel Fortran, and you should try comp.lang.fortran and other forums with gFortran questions.

0 Kudos