From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32570 invoked by alias); 23 May 2008 18:23:38 -0000 Received: (qmail 32447 invoked by uid 48); 23 May 2008 18:22:54 -0000 Date: Fri, 23 May 2008 18:23:00 -0000 Subject: [Bug fortran/36316] New: type mismatch in binary expression caught by verify_gimple X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "toon at moene dot indiv dot nluug dot nl" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-05/txt/msg01804.txt.bz2 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 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