On Wed, Apr 16, 2025 at 04:44:23AM +0000, ZAPART CHRISTOPHER ANDREW wrote:
>
> After a recent upgrade from Fedora 41 to 42 the gfortran got updated from 14
> to 15.0.1:
>
> [chris@fedora FITSWEBQLSE]$ gfortran --version
> GNU Fortran (GCC) 15.0.1 20250329 (Red Hat 15.0.1-0)
>
> The new version 15.0.1 seems to treat "shiftl" elemental intrinsic functions
> as IMPURE. As a consequence "shiftl" cannot be used inside DO CONCURRENT
> anymore:
>
> Error: Reference to impure function at (1) inside a DO CONCURRENT
> src/fixed_array.f90:118:27:
>
> 118 | x1 = 1 + shiftl(i - 1, BASE)
> | 1
> Error: Reference to impure function at (1) inside a DO CONCURRENT
> src/fixed_array.f90:119:24:
>
Do you have a small code that exhibits this issue?
The one constructed compiles without error.
program foo
integer a(100), b(100), i
a = [(i,i=1,100)]
print *, a(1), a(10)
do concurrent (i=1:100)
b(i) = shiftl(a(i), mod(i,8))
end do
print *, b(1), b(10)
end program foo
Also, what compiler options are you using?
--
Steve