Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29010 Discussions

Bogus standard conformance warning with operator(*) overloading

Harald
Beginner
296 Views
Hello,

ifort v12 gives a bogus warning for the following case:

% ifort -stand -c ifort-bogus-warning.f90
ifort-bogus-warning.f90(34): warning #6191: Fortran 2003 requires an arithmeticdata type in this context. [SIZE]
real :: z(size (x,1)*size (x,2)) ! <- ifort warns here
--------------------------^
ifort-bogus-warning.f90(34): warning #6191: Fortran 2003 requires an arithmeticdata type in this context. [SIZE]
real :: z(size (x,1)*size (x,2)) ! <- ifort warns here
-------------------------------------^

Here's the source:

ifort-bogus-warning.f90

When I comment out the interface operator(*), the warning disappears.
I think that the code is fully standard conforming.

Harald
0 Kudos
4 Replies
Harald
Beginner
296 Views
I forgot to mention: commenting out the "interface size" part
makes the warning also disappear.

Harald
0 Kudos
Steven_L_Intel1
Employee
296 Views
Thanks - we'll take a look at this.
0 Kudos
Steven_L_Intel1
Employee
296 Views
Escalated as issue DPD200170370.
0 Kudos
Steven_L_Intel1
Employee
296 Views
Fixed in a future release.
0 Kudos
Reply