Quantcast
Channel: Recent posts
Viewing all articles
Browse latest Browse all 415

ifort bug with some fortran elemental functions

$
0
0

One of my customer has been experiencing a strange bug with ifort compiler.
We've found a workaround as this bug has a minor impact.

Problem Description:

ifort fails to compile the following sample program:

ibset.F90
######################
MODULE IOSTREAM

SAVE

CONTAINS

SUBROUTINE SETUP_IOREQUEST(IBSET)

IMPLICIT NONE

INTEGER,POINTER :: IBSET(:)

END SUBROUTINE SETUP_IOREQUEST

END MODULE IOSTREAM

PROGRAM HOP

USE IOSTREAM, ONLY: SETUP_IOREQUEST

IMPLICIT NONE

INTEGER :: NSTTYP
INTEGER :: TOTO
INTEGER :: IRETRTYPE

ASSOCIATE(NSTTYP=>TOTO)

IRETRTYPE=IBSET(IRETRTYPE,19)

END ASSOCIATE

END PROGRAM HOP
######################

the error is the following one:

ibset.F90(29): error #6410: This name has not been declared as an array or a function.   [IBSET]
IRETRTYPE=IBSET(IRETRTYPE,19)
----------^
compilation aborted for ibset.F90 (code 1)

It happens with ifort compilers :
ifort version 13.0.1
ifort version 15.0.0
ifort version 15.0.1
ifort version 15.0.2
ifort version 15.0.3
ifort version 15.0.4
ifort version 15.0.6
ifort version 16.0.0
ifort version 16.0.1
ifort version 16.0.2
ifort version 16.0.3
ifort version 16.0.4
ifort version 17.0.0
ifort version 17.0.1

The error is raised for all IBSET derivative functions such as:
Name        Argument    Return type    Standard 
IBSET(A)    INTEGER A    INTEGER        Fortran 95 and later 
BBSET(A)    INTEGER(1) A    INTEGER(1)    GNU extension 
IIBSET(A)    INTEGER(2) A    INTEGER(2)    GNU extension 
JIBSET(A)    INTEGER(4) A    INTEGER(4)    GNU extension 
KIBSET(A)    INTEGER(8) A    INTEGER(8)    GNU extension 

The error is not raised when using fortran elemental functions such as SIN, COS...

It seems to be an old bug (with very minor impact) with ifort compiler.

Sincerely

France


Viewing all articles
Browse latest Browse all 415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>