The following module definition:

MODULE YOMCAIN

IMPLICIT NONE
SAVE

TYPE distributed_vector
REAL, pointer :: local(:)
INTEGER       :: global_length,local_start,local_end,nchnks
END TYPE distributed_vector

INTERFACE ASSIGNMENT (=)
MODULE PROCEDURE assign_dv_dv
END INTERFACE

INTERFACE OPERATOR (*)
MODULE PROCEDURE multiply_dv_dv
END INTERFACE

CONTAINS

SUBROUTINE assign_dv_dv (handle1,handle2)

!         copy one distributed_vector to another

TYPE (distributed_vector), INTENT(IN)    :: handle2
TYPE (distributed_vector), INTENT(INOUT) :: handle1

handle1%local(:) = handle2%local(:)

RETURN
END SUBROUTINE assign_dv_dv

FUNCTION multiply_dv_dv (handle1,handle2)

!         multiply two distributed_vectors

TYPE (distributed_vector), INTENT(IN) :: handle2
TYPE (distributed_vector), INTENT(IN) :: handle1
REAL, DIMENSION(handle1%local_start:handle1%local_end) ::multiply_dv_dv

multiply_dv_dv = handle1%local(:) * handle2%local(:)

RETURN
END FUNCTION multiply_dv_dv


SUBROUTINE CAININAD_SCALE_DISTVEC ()
TYPE (distributed_vector) :: PVAZG
TYPE (distributed_vector) :: ZTEMP
TYPE (distributed_vector) :: SCALP_DV

ZTEMP = PVAZG * SCALP_DV
END SUBROUTINE CAININAD_SCALE_DISTVEC
END MODULE YOMCAIN

draws this error message when compiling with a recent 4.4.0 gfortran:

a.F90: In function 'caininad_scale_distvec':
a.F90:47: error: type mismatch in binary expression
integer(kind=8)

integer(kind=4)

integer(kind=4)

D.1027 = D.1026 - D.1025
a.F90:47: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

This 4.3.1 gfortran doesn't have any complaints about this source:

gfortran -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure linux gnu
Thread model: posix
gcc version 4.3.1 20080401 (prerelease) (Debian 4.3.0-3)


-- 
           Summary: type mismatch in binary expression caught by
                    verify_gimple
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: toon at moene dot indiv dot nluug dot nl


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

Reply via email to