- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following code generates a compile-time error but I think the code is correct.
Here is the code:
Program Main implicit none Type :: MyType real(8) ,allocatable ,codimension[:] :: CoVar End Type type(MyType) :: Object ! The following line cause a compile-time error with ifort version 15.0.4 Object%CoVar = CoMinVal( Object%CoVar ) ! main.f90(12): error #8396: If the dummy argument is a coarray, the corresponding actual argument must be a coarray and must have the VOLATILE attribute if and only if the dummy argument has the VOLATILE attribute. [COVAR] associate( CoVar => Object%CoVar ) CoVar = CoMinVal( CoVar ) end associate contains Pure Function CoMinVal( CoVar ) result(VarMin) real(8) ,codimension
and the compilation output is:
$ ifort -v && ifort -coarray main.f90 ifort version 15.0.4 main.f90(12): error #8396: If the dummy argument is a coarray, the corresponding actual argument must be a coarray and must have the VOLATILE attribute if and only if the dummy argument has the VOLATILE attribute. [COVAR] Object%CoVar = CoMinVal( Object%CoVar ) ! main.f90(12): error #8396: If the dummy argument is a coarray, the corresponding actual argument must be a coarray and must have the VOLATILE attribute if and only if the dummy argument has the VOLATILE attribute. [COVAR] ----------------------------------------------^ compilation aborted for main.f90 (code 1)
Note that a workaround consists of using an associate block
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any updates on this one ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, looks as if we overlooked it. I see it still fails in 17.0.1 and will report it to the developers tomorrow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Escalated as issue DPD200416774 - sorry for missing this.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page