MAXVAL in constant expressions?

MAXVAL in constant expressions?

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

 

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

Retired 12/31/2016

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

 

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

Leave a Comment

Please sign in to add a comment. Not a member? Join today