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

ICE for merge with strings

Diehl__Martin
Novice
164 Views

The following code (misuse of merge as a ternary operator) results in an ICE with ifort version 19.1.1.217 unless compiled with -O0

program test                                                                                        
                                                                                                    
  character(len=*), parameter :: str = 'abcde'                                                      
                                                                                                    
  print*, index(str,merge('a','d',str(4:4) == 'd'))                                                 
                                                                                                    
end program test
0 Kudos
0 Replies
Reply