https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93871
--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Fri, Feb 21, 2020 at 07:45:39PM +0000, thenlich at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93871 > > --- Comment #6 from Thomas Henlich <thenlich at gcc dot gnu.org> --- > (In reply to kargl from comment #2) > > Can you post the code you used for testing? Your patch to simplify.c > > affects compile-time constant folding. simplify.c has nothing to do > > with a run-time evaluation. > > Ok, I was looking in the wrong place. > > It's still a cool patch though ;-) Any patch that makes gfortran better is a cool. Was gonna suggest a variation of this code for a testcase: program foo complex, parameter :: z = cotan((1.,1.)) print *, z end program foo troutmask:sgk[218] gfcx -o z -fdec a.f90 && ./z f951: internal compiler error: Segmentation fault 0xdf68ca crash_signal ../../gccx/gcc/toplev.c:328 0x7bae8f check_null ../../gccx/gcc/fortran/expr.c:2796 0x7bae8f gfc_check_init_expr(gfc_expr*) ../../gccx/gcc/fortran/expr.c:2897 0x7b7229 check_intrinsic_op ../../gccx/gcc/fortran/expr.c:2440 0x7bac91 gfc_check_init_expr(gfc_expr*) ../../gccx/gcc/fortran/expr.c:2850 0x7bb427 gfc_reduce_init_expr(gfc_expr*) ../../gccx/gcc/fortran/expr.c:3067 0x7bf156 gfc_match_init_expr(gfc_expr**) ../../gccx/gcc/fortran/expr.c:3113 0x7a6dde variable_decl ../../gccx/gcc/fortran/decl.c:2854 0x7a6dde gfc_match_data_decl() ../../gccx/gcc/fortran/decl.c:6130 0x812eec match_word ../../gccx/gcc/fortran/parse.c:65 0x812eec decode_statement ../../gccx/gcc/fortran/parse.c:376 0x818854 next_free ../../gccx/gcc/fortran/parse.c:1279 0x818854 next_statement ../../gccx/gcc/fortran/parse.c:1511 0x81b0ac parse_spec ../../gccx/gcc/fortran/parse.c:3738 0x81d0bf parse_progunit ../../gccx/gcc/fortran/parse.c:5848 0x81e7b4 gfc_parse_file() ../../gccx/gcc/fortran/parse.c:6388 0x8718f8 gfc_be_parse_file ../../gccx/gcc/fortran/f95-lang.c:210