- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
module mwe
contains
subroutine fail(a,b)
implicit none
integer, intent(out), optional :: a
integer, intent(out), optional :: b
integer :: args_present
args_present = sum(merge(1,0,[present(a),present(b)]))
end subroutine fail
end module mwe
The above trivial module ICEs ifx 2025.1.0 20250317, but only with this command line:
ifx -assume norealloc_lhs -check all mwe.F90
Dropping either of the options makes the compiler behave.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's the -check shape along with -assume norealloc_lhs combo. I can see how the compiler could get confused about how to check shape when you say to not create an temp for the LHS in this case. Easy for us to see that the result of the expression on the LHS is a simple scalar, but it's a merge of an array which is then sum'med.
I will get a bug report started. Until there is a fix you can use
-warn all,noshape
to prevent the error.
Thank you for a simple and easy to understand sample.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
bug ID is CMPLRLLVM-68884
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for making this into a bug ID and for the suggested workaround. We found that a simple replacement of
sum(merge(1,0,[...]))
with
count([...])
made the compiler behave.

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