https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69544
Bug ID: 69544
Summary: Internal compiler error with -Wall and where
Product: gcc
Version: 5.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: joshuahykes at yahoo dot com
Target Milestone: ---
Adding -Wall causes a compiler error on code that compiles okay without -Wall.
See example:
$ cat where_ice.f90
subroutine where_ice (i,j)
!
implicit none
!
integer, parameter :: n = 10
real(4) :: x(n,n,2)
character(8) :: y(n,n,2)
!
integer :: i
integer :: j
real(4) :: arr(n)
!
character(12) :: txt(5)
!
where (arr(1:9) > -1.e+6) x(1:9,i,j) = arr(1:9)
where (txt(1:3) /= '' ) y(1:3,i,j) = txt(1:3)
!
end subroutine where_ice
$ gfortran -c where_ice.f90
$ gfortran -Wall -c where_ice.f90
in gfc_format_decoder, at fortran/error.c:1121
0x5e0fae gfc_format_decoder
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/fortran/error.c:1121
0x10479bf pp_format(pretty_printer*, text_info*)
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/pretty-print.c:613
0x1044d7d diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/diagnostic.c:865
0x5e260a gfc_warning_now(int, char const*, ...)
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/fortran/error.c:1244
0x644997 resolve_ordinary_assign
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/fortran/resolve.c:9367
0x644997 gfc_resolve_code(gfc_code*, gfc_namespace*)
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/fortran/resolve.c:10182
0x642157 gfc_resolve_blocks(gfc_code*, gfc_namespace*)
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/fortran/resolve.c:9254
0x64243c gfc_resolve_code(gfc_code*, gfc_namespace*)
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/fortran/resolve.c:10081
0x644d92 resolve_codes
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/fortran/resolve.c:15055
0x644e72 gfc_resolve(gfc_namespace*)
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/fortran/resolve.c:15083
0x63081a resolve_all_program_units
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/fortran/parse.c:5280
0x63081a gfc_parse_file()
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/fortran/parse.c:5523
0x670355 gfc_be_parse_file
/home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/gcc/fortran/f95-lang.c:228
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/joshua2/opt/gcc/linux-64/gcc-5.1.0/libexec/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/joshua2/opt/gcc/linux-64/gcc-5.1.0-src/configure
--prefix=/home/joshua2/opt/gcc/linux-64/gcc-5.1.0
Thread model: posix
gcc version 5.1.0 (GCC)