SUM not allowed in constant expressions??

SUM not allowed in constant expressions??

The compiler complains that SUM is invalid in constant/initialization expressions, the argument to SUM is ofcourse a constant array...

Is this correct according to F03/08?

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

This feature is first specified in f2008 but not yet implemented in ifort.

I read in section 7.1.7 of the f03 draft (N1601) that :

(5) A reference to a transformational standard intrinsic function other than NULL, where each
argument is an initialization expression,

is OK. Am I missing something?

Steve Lionel (Intel)'s picture

This is one of the last remaining items on our F03 list. It is not yet implemented but we hope to have it by this time next year.

Steve

OK.

For some reason I was convinced that parameterized derived types was the only F03 feature you didn't yet support, but taking a new look in the latest release notes I see that also the transformational intrinsics in initialization expressions lack. Perhaps I didn't noce it because it is on the next page ;)

I found a way through creating a "dummy array" and using SIZE though :)

Login to leave a comment.