- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This works fine with ifort, but gets an ICE with ifx (IFX) 2023.1.0 20230320
program demo_s2c
implicit none
character(len=*),parameter :: string='single string'
character(len=3),allocatable :: array(:)
integer :: i
! put one character into each 3-character element of array
array = [(string(i:i),i=1,len(string))]
! write array with ASCII Decimal Equivalent below it except show
! unprintable characters like NULL as "XXX"
write(*,'(1x,*("[",a3,"]":))') merge('XXX',array,iachar(array(:)(1:1)) < 32)
write(*,'(1x,*("[",i3,"]":))') iachar(array(:)(1:1))
end program demo_s2c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting this! I have good news! I compiled with an internal build of the next compiler and no ICE. This compiler is planned for release mid-year 2023.
This output matches what I get from ifort.
$ ifx demo_s2c.f90
$ a.out
[s ][i ][n ][g ][l ][e ][ ][s ][t ][r ][i ][n ][g ]
[115][105][110][103][108][101][ 32][115][116][114][105][110][103]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting this! I have good news! I compiled with an internal build of the next compiler and no ICE. This compiler is planned for release mid-year 2023.
This output matches what I get from ifort.
$ ifx demo_s2c.f90
$ a.out
[s ][i ][n ][g ][l ][e ][ ][s ][t ][r ][i ][n ][g ]
[115][105][110][103][108][101][ 32][115][116][114][105][110][103]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just confirmed the ICE you reported is actually fixed in the compiler that will be available in the next few weeks as part of oneAPI 2023.2.
Be sure to check it out when it is available.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page