* ICE with generic function
@ 2018-03-31 4:12 Andrew Benson
0 siblings, 0 replies; only message in thread
From: Andrew Benson @ 2018-03-31 4:12 UTC (permalink / raw)
To: gfortran
I opened a PR for the following problem:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85138
The following (reduced from a much larger module) causes an ICE with gfortran
8.0.1 r258983:
module fox_m_fsys_format
interface len
module procedure str_real_sp_len, str_real_sp_fmt_len
end interface
contains
pure function str_real_sp_fmt_len(x, fmt) result(n)
real, intent(in) :: x
character(len=*), intent(in) :: fmt
if (.not.checkFmt(fmt)) then
endif
end function str_real_sp_fmt_len
pure function str_real_sp_len(x) result(n)
real, intent(in) :: x
n = len(x, "")
end function str_real_sp_len
function str_real_dp_matrix(xa) result(s)
real, intent(in) :: xa
character(len=len(xa)) :: s
end function str_real_dp_matrix
end module fox_m_fsys_format
$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/abenson/Galacticus/Tools/libexec/gcc/x86_64-pc-
linux-gnu/8.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/home/abenson/Galacticus/Tools
--enable-languages=c,c++,fort
an --disable-multilib
Thread model: posix
gcc version 8.0.1 20180330 (experimental) (GCC)
$ gfortran -c tmp3.F90
tmp3.F90:9:0:
if (.not.checkFmt(fmt)) then
internal compiler error: in gfc_typenode_for_spec, at fortran/trans-types.c:
1157
0x5ee3b2 gfc_typenode_for_spec(gfc_typespec*, int)
../../gcc-trunk/gcc/fortran/trans-types.c:1157
0x889d77 gfc_conv_unary_op
../../gcc-trunk/gcc/fortran/trans-expr.c:2802
0x887060 gfc_conv_expr_op
../../gcc-trunk/gcc/fortran/trans-expr.c:3317
0x887060 gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc-trunk/gcc/fortran/trans-expr.c:7918
0x889cc7 gfc_conv_expr_val(gfc_se*, gfc_expr*)
../../gcc-trunk/gcc/fortran/trans-expr.c:7975
0x8c00d7 gfc_trans_if_1
../../gcc-trunk/gcc/fortran/trans-stmt.c:1427
0x8c8dba gfc_trans_if(gfc_code*)
../../gcc-trunk/gcc/fortran/trans-stmt.c:1464
0x84ca37 trans_code
../../gcc-trunk/gcc/fortran/trans.c:1916
0x878a2d gfc_generate_function_code(gfc_namespace*)
../../gcc-trunk/gcc/fortran/trans-decl.c:6507
0x850cc1 gfc_generate_module_code(gfc_namespace*)
../../gcc-trunk/gcc/fortran/trans.c:2222
0x80333b translate_all_program_units
../../gcc-trunk/gcc/fortran/parse.c:6108
0x80333b gfc_parse_file()
../../gcc-trunk/gcc/fortran/parse.c:6324
0x849b8f gfc_be_parse_file
../../gcc-trunk/gcc/fortran/f95-lang.c:204
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
--
* Andrew Benson: http://users.obs.carnegiescience.edu/abenson/contact.html
* Galacticus: http://sites.google.com/site/galacticusmodel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-31 4:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-31 4:12 ICE with generic function Andrew Benson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).