- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Fortran standard, as far as I am aware, prohibits the use of automatic coarrays. However, I have noticed that Intel Fortran compiler 2018, allows such automatic object creations. For example, ifort happily compiles the following code in the debug mode and the code works totally fine:
program testAutoCoarray implicit none integer :: i integer, parameter :: nd=10 call createAutoCoarray(nd) end program testAutoCoarray subroutine createAutoCoarray(nd) implicit none integer, intent(in) :: nd real, save :: AutoCoarray(nd)
Have I understood the Fortran 2008 standard incorrectly, or this is a bug in ifort. It is notable that ifort crashes with catastrophic internal error if I attempt to compile the same code as above in O2 or O3 modes. Here is the message:
E:\testAutomaticCoarray>ifort /O2 /Qcoarray=shared /standard-semantics /assume:realloc_lhs main.f90 -o run.exe Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0.1.156 Build 20171018 Copyright (C) 1985-2017 Intel Corporation. All rights reserved. 0_8000 E:\testAutomaticCoarray\main.f90(12): catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error. compilation aborted for main.f90 (code 1)
Thank you for your help and great work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler should never have allowed this. AutoCoarray can't be automatic, because it has the SAVE attribute. But then it has a specification expression for bounds, which makes it automatic.
There is no explicit prohibition of an "automatic coarray", but the requirement that a coarray be "an associate name, a dummy argument, or have the ALLOCATABLE or SAVE attribute" effectively eliminates that possibility.
Please report this bug to Intel at https://supporttickets.intel.com/?lang=en-US
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler should never have allowed this. AutoCoarray can't be automatic, because it has the SAVE attribute. But then it has a specification expression for bounds, which makes it automatic.
There is no explicit prohibition of an "automatic coarray", but the requirement that a coarray be "an associate name, a dummy argument, or have the ALLOCATABLE or SAVE attribute" effectively eliminates that possibility.
Please report this bug to Intel at https://supporttickets.intel.com/?lang=en-US
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve, I reported the bug. Your comments are always very informative, thanks!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page