[Bug fortran/70524] [5/6/7 Regression] ICE when using -frepack-arrays -Warray-temporaries
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Wed Jun 29 18:21:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70524
--- Comment #7 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
> The ICEs should only happen with --enabled-checking.
Correct.
Here is a small reproducer (wrong code) to experiment with :
$ cat z1.f90
subroutine s(x)
integer :: x(:)
integer :: n = size(lbound(x))
end
Should give a regular error :
$ gfortran-6 -frepack-arrays -Warray-temporaries -c z1.f90
z1.f90:4:0:
end
Warning: Creating array temporary at (1) [-Warray-temporaries]
In contrast :
$ cat z0.f90
subroutine s(x)
integer :: x(:)
integer :: n = sum(lbound(x))
end
$ gfortran-6 -frepack-arrays -Warray-temporaries -c z0.f90
z0.f90:3:29:
integer :: n = sum(lbound(x))
1
Error: Deferred array 'x' at (1) is not permitted in an initialization
expression
More information about the Gcc-bugs
mailing list