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

Does IVF11.1.067 support allocatable assignment (Fortran 2003 Standard)

asymptotic
Beginner
492 Views
The following example comes from -- The Fortran 2003 Handbook P235

integer, allocatable:: IA(:)

IA = [1, 2, 3, 4] ! not allocated, not consistent with Fortran 2003 Standard

write(unit = *, fmt = *) IA


Thanks a lot.
0 Kudos
3 Replies
TimP
Honored Contributor III
492 Views
The (recently revised) forum search tool is working for me. e.g.
http://software.intel.com/en-us/forums/showthread.php?t=67116
0 Kudos
Robert_van_Amerongen
New Contributor III
492 Views
When you compile the example with the option /assume:realloc_lhs ( see the tim18 answer) everyting went file. Without this option, but with the option /check there appears a run-time error where the program complains that an unallocated array is tried to be set. Without the check option, there is neither a compile error nor a run-time error nor any output at all.
I am a little surprised that you have to tell the compiler explicitely that you want to have a language feature supported, although the remarks of Steve in this respect make sens.

Robert
0 Kudos
asymptotic
Beginner
492 Views
Thanks a lot.

In MS Visual Studio 2008 IDE Properties --> Fortran --> Command Line --> Additional Options write-----/assume:realloc_lhs, the program works fine.

But it not appear in IDE Equivalent


Windows: Compatibility > Treat Backslash as Normal Character in Strings (/assume:[no]bscc)

Data > Assume Dummy Arguments Share Memory Locations (/assume:[no]dummy_aliases)

Data > Constant Actual Arguments Can Be Changed (/assume:[no]protect_constants)

Data > Use Bytes as RECL=Unit for Unformatted Files (/assume:[no]byterecl)

Floating Point > Enable IEEE Minus Zero Support (/assume:[no]minus0)

Optimization > I/O Buffering (/assume:[no]buffered_io)

Preprocessor > Default Include and Use Path (/assume:[no]source_include)

Preprocessor > OpenMP Conditional Compilation (/assume:[no]cc_omp)

External Procedures > Append Underscore to External Names (/assume:[no]underscore)


0 Kudos
Reply