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

MAXVAL in constant expressions?

Harald
Beginner
1,209 Views

Hello,

are there plans to support MAXVAL & friends in F2008 constant expressions?

  integer, parameter :: m = maxval ( [ 1, 2 ] )
end

leads to

% ifort -V ifort-const-maxval.f90 -stand f08Intel(R) Fortran Compiler XE for applications running on IA-32, Version 14.0.1.106 Build 20131008
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.
FOR NON-COMMERCIAL USE ONLY

 Intel(R) Fortran 14.0-1599
ifort-const-maxval.f90(1): error #6263: This intrinsic function is invalid in constant expressions.   [MAXVAL]
  integer, parameter :: m = maxval ( [ 1, 2 ] )
----------------------------^
compilation aborted for ifort-const-maxval.f90 (code 1)

Thanks,

Harald

 

0 Kudos
3 Replies
Steven_L_Intel1
Employee
1,209 Views

Plans? Yes. I can't yet predict when this will be enabled, but doing all the "constant expression" stuff is on our "sooner rather than later" list.

0 Kudos
Harald
Beginner
1,209 Views

At least this one is fixed in

Intel(R) Fortran Compiler XE for applications running on IA-32, Version 15.0.0.090 Build 20140723

Harald

 

0 Kudos
JVanB
Valued Contributor II
1,209 Views

Fixed as a consequence of transformational intrinsics in constant expressions being an f2003 feature and version 15 implementing all of f2003.

0 Kudos
Reply