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

issue with assumed length + assumed shape character array declaration

Thomas_C_
Beginner
792 Views

It is unclear to me why the following declaration is causing a run-time error when compiled in ifort. This source does run as expected without error when compiled using GNU GCC version 4.4.3:

subroutine splitString(stringArray, stringCSV, separator)
        implicit none
        character(len=*), dimension(:), intent(inout) :: stringArray
        character(len=*), intent(in) :: stringCSV
        character(len=*), intent(in), optional :: separator
        ...
end subroutine

The run-time error is:

forrtl: severe (408): fort: (6): Non-unit stride for dimension 1 of assumed-shape array STRINGARRAY in routine SPLITSTRING and fe_asha_1ds1 specified

my ifort compiler is:

Intel(R) Visual Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.0.4.196 Build 20110427

 

0 Kudos
3 Replies
Roland_W_Intel1
Employee
792 Views

We really can't tell what's going on here either.  If you can provide a reproducer, submit an issue to Intel Premier Support and we'll investigate.

0 Kudos
Steven_L_Intel1
Employee
792 Views

Please also provide the compile options used. The error message suggests you are using an undocumented option that has major restrictions.

0 Kudos
Thomas_C_
Beginner
792 Views

Steve, Roland.

Thank you for your help - while this error was consistently reproducible on the date that I reported it, I've not been able to reproduce it since. It must have been a device issue that a reboot solved.

0 Kudos
Reply