[Bug fortran/95980] ICE in get_unique_type_string, at fortran/class.c:485
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95980 --- Comment #16 from G. Steinmetz --- Yeah, and other parts are sort of amazing too. Let me allow to cite the complete 4.2, item 2, points (1)-(10) : 2 A processor conforms to this document if: (1) it executes any standard-conforming program in a manner that fulfills the interpretations herein, subject to any limits that the processor may impose on the size and complexity of the program; (2) it contains the capability to detect and report the use within a submitted program unit of a form designated herein as obsolescent, insofar as such use can be detected by reference to the numbered syntax rules and constraints; (3) it contains the capability to detect and report the use within a submitted program unit of a form or relationship that is not permitted by the numbered syntax rules or constraints, including the deleted features described in Annex B; (4) it contains the capability to detect and report the use within a submitted program unit of an intrinsic type with a kind type parameter value not supported by the processor (7.4); (5) it contains the capability to detect and report the use within a submitted program unit of source form or characters not permitted by Clause 6; (6) it contains the capability to detect and report the use within a submitted program of name usage not consistent with the scope rules for names, labels, operators, and assignment symbols in Clause 19; (7) it contains the capability to detect and report the use within a submitted program unit of a non-standard intrinsic procedure (including one with the same name as a standard intrinsic procedure but with different requirements); (8) it contains the capability to detect and report the use within a submitted program unit of a non-standard intrinsic module; (9) it contains the capability to detect and report the use within a submitted program unit of a procedure from a standard intrinsic module, if the procedure is not defined by this document or the procedure has different requirements from those specified by this document; and (10) it contains the capability to detect and report the reason for rejecting a submitted program. Thanks !
[Bug fortran/96099] ICE in gfc_validate_kind, at fortran/trans-types.c:773
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96099 --- Comment #2 from G. Steinmetz --- Oh yes, of course ... a silly cut and paste thing. It has to be : $ cat z1.f90 program p implicit class(t) (1) type t end type end $ cat z2.f90 program p integer n1 parameter (n1 = 1) implicit class(t) (n1) type t end type end
[Bug fortran/96102] New: ICE in check_host_association, at fortran/resolve.c:5994
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96102 Bug ID: 96102 Summary: ICE in check_host_association, at fortran/resolve.c:5994 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- It's an old issue, affects versions down to at least r5 : $ cat z1.f90 module m integer :: n = 2 contains subroutine s if ( n /= 2 ) stop 1 contains integer function n() n = 0 end end end $ gfortran-11-20200705 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbd3bdf crash_signal ../../gcc/toplev.c:328 0x6c515c check_host_association ../../gcc/fortran/resolve.c:5994 0x6c515c gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7053 0x6c76d7 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:4410 0x6c76d7 resolve_operator ../../gcc/fortran/resolve.c:3997 0x6c4087 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7047 0x6d5ff1 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7021 0x6d5ff1 gfc_resolve_blocks(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:10658 0x6cbc88 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11746 0x6ce517 resolve_codes ../../gcc/fortran/resolve.c:17273 0x6ce44e resolve_codes ../../gcc/fortran/resolve.c:17256 0x6ce5de gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17308 0x6b64f2 gfc_parse_file() ../../gcc/fortran/parse.c:6448 0x70284f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/96102] ICE in check_host_association, at fortran/resolve.c:5994
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96102 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-invalid-code --- Comment #1 from G. Steinmetz --- For reference a valid and working variant : $ cat z0.f90 module m integer :: n = 2 contains subroutine s if ( n() /= 0 ) stop 1 print *, n() contains integer function n() n = 0 end end end program p use m call s end $ gfortran-11-20200705 z0.f90 && ./a.out 0 $
[Bug fortran/95980] ICE in get_unique_type_string, at fortran/class.c:485
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95980 --- Comment #14 from G. Steinmetz --- > ... and real programmers wrote fine Fortran programs. Yeah, optimal world. That's probably the reason why some "real" programs don't need test cases - or at most three, because they cover everything ;-) Nobody likes "stupid" bugs. Aren't "smart" bugs from "smart" codes of "smart" people the better ones ?-) Some may proclaim 80% as the new standard threshold. But is 80% of 20% enough, and is there a VAT ?-) Most people underestimate the effort for thorough testing - not by a factor of 2, but by a factor of X or L or more. But enough with irony and sarcasm. --- Even the standards changed, too. F2018 has the audacity to demand chapter 4.2, item 2. I would like to see gfortran at a level where an average or casual programmer will not encounter an ICE with things like a forgotten/wrong keyword, attribute or syntactical element. It's easy enough to think logically wrong, to be in a hurry and mess things up. A compiler could be a helper and guide. No one said it wouldn't be hard and it won't take long. Thanks to all bold and brave people that work hard on it.
[Bug fortran/96087] [9/10/11 Regression] ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1575
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96087 --- Comment #3 from G. Steinmetz --- Thanks for nailing down the commit for addon comment 1. But when started the regression/issue from comment 0 ? gfortran 9.3 does not have the ICE.
[Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96101 Bug ID: 96101 Summary: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started with early r8 (before 20180525), r7 compiles it : $ cat z1.f90 program p character(:), allocatable :: x x = 'abc' associate (y => ([x(:)])) print *, y end associate end $ gfortran-7 -c z1.f90 $ $ gfortran-11-20200705 -c z1.f90 z1.f90:5:0: 5 | print *, y | internal compiler error: Segmentation fault 0xd6980f crash_signal ../../gcc/toplev.c:328 0x9d1760 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/tree.h:3416 0x9d1760 fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gcc/fold-const.c:2398 0x750120 gfc_trans_create_temp_array(stmtblock_t*, stmtblock_t*, gfc_ss*, tree_node*, tree_node*, bool, bool, bool, locus*) ../../gcc/fortran/trans-array.c:1415 0x75d797 gfc_conv_loop_setup(gfc_loopinfo*, locus*) ../../gcc/fortran/trans-array.c:5246 0x75dae2 gfc_conv_expr_descriptor(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-array.c:7447 0x7de401 trans_associate_var ../../gcc/fortran/trans-stmt.c:1890 0x7e4af9 gfc_trans_block_construct(gfc_code*) ../../gcc/fortran/trans-stmt.c:2283 0x7463a7 trans_code ../../gcc/fortran/trans.c:1960 0x77d745 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6840 0x6f6026 translate_all_program_units ../../gcc/fortran/parse.c:6307 0x6f6026 gfc_parse_file() ../../gcc/fortran/parse.c:6546 0x74269f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/96100] New: [9/10/11 Regression] ICE in gimplify_expr, at gimplify.c:14638
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96100 Bug ID: 96100 Summary: [9/10/11 Regression] ICE in gimplify_expr, at gimplify.c:14638 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20190310 and 20190331, r8 compiles it : $ cat z1.f90 program p type t character(:), allocatable :: c(:) end type type(t) :: x associate (y => [x%c(1:1)]) end associate end $ gfortran-8 -c z1.f90 $ $ gfortran-11-20200705 -c z1.f90 z1.f90:6:0: 6 |associate (y => [x%c(1:1)]) | internal compiler error: in gimplify_expr, at gimplify.c:14638 0x95f096 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:14638 0x9681f9 gimplify_modify_expr ../../gcc/gimplify.c:5779 0x95e923 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:13637 0x960a58 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6822 0x95e6f3 gimplify_statement_list ../../gcc/gimplify.c:1856 0x95e6f3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:14081 0x960a58 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6822 0x95e50a gimplify_and_add(tree_node*, gimple**) ../../gcc/gimplify.c:486 0x95e50a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:13988 0x960a58 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6822 0x9613c1 gimplify_bind_expr ../../gcc/gimplify.c:1411 0x95eb52 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:13838 0x960a58 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6822 0x95e6f3 gimplify_statement_list ../../gcc/gimplify.c:1856 0x95e6f3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:14081 0x960a58 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6822 0x9613c1 gimplify_bind_expr ../../gcc/gimplify.c:1411 0x95eb52 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:13838 0x960a58 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6822 0x961e39 gimplify_body(tree_node*, bool) ../../gcc/gimplify.c:14873
[Bug fortran/96099] New: ICE in gfc_validate_kind, at fortran/trans-types.c:773
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96099 Bug ID: 96099 Summary: ICE in gfc_validate_kind, at fortran/trans-types.c:773 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Follow-up of pr95586 : $ cat z1.f90 program p implicit type(t) (1) type t end type end $ cat z2.f90 program p integer n1 parameter (n1 = 1) implicit type(t) (n1) type t end type end $ gfortran-11-20200705 -c z1.f90 f951: internal compiler error: gfc_validate_kind(): Got bad type 0x6584b9 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x659bda gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1402 0x781447 gfc_validate_kind(bt, int, bool) ../../gcc/fortran/trans-types.c:773 0x642f21 gfc_match_kind_spec(gfc_typespec*, bool) ../../gcc/fortran/decl.c:3191 0x64a2e2 gfc_match_implicit() ../../gcc/fortran/decl.c:4834 0x6abd31 match_word ../../gcc/fortran/parse.c:65 0x6aff19 decode_statement ../../gcc/fortran/parse.c:508 0x6b0b6a next_free ../../gcc/fortran/parse.c:1280 0x6b0b6a next_statement ../../gcc/fortran/parse.c:1512 0x6b2f14 parse_spec ../../gcc/fortran/parse.c:3739 0x6b4f8c parse_progunit ../../gcc/fortran/parse.c:5852 0x6b6669 gfc_parse_file() ../../gcc/fortran/parse.c:6393 0x70284f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/96087] New: [9/10/11 Regression] ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1575
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96087 Bug ID: 96087 Summary: [9/10/11 Regression] ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1575 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- This changed between 20200308 and 20200412 : $ cat z1.f90 module m interface module function f(n) result(z) integer, intent(in) :: n real :: z(n) end end interface contains module procedure f z = 1 end procedure end $ gfortran-10-20200308 -c z1.f90 $ $ gfortran-11-20200705 -c z1.f90 z1.f90:3:0: 3 | module function f(n) result(z) | internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1575 0x72bceb gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1575 0x73a4b8 gfc_conv_variable ../../gcc/fortran/trans-expr.c:2735 0x7366ca gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8693 0x739523 gfc_conv_expr_val(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8738 0x739670 gfc_conv_expr_type(gfc_se*, gfc_expr*, tree_node*) ../../gcc/fortran/trans-expr.c:8752 0x712edf gfc_trans_dummy_array_bias(gfc_symbol*, tree_node*, gfc_wrapped_block*) ../../gcc/fortran/trans-array.c:6668 0x72ce1c gfc_trans_deferred_vars(gfc_symbol*, gfc_wrapped_block*) ../../gcc/fortran/trans-decl.c:4862 0x72f408 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6945 0x709c49 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2264 0x6b6901 translate_all_program_units ../../gcc/fortran/parse.c:6294 0x6b6901 gfc_parse_file() ../../gcc/fortran/parse.c:6546 0x70284f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/96087] [9/10/11 Regression] ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1575
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96087 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-valid-code --- Comment #1 from G. Steinmetz --- This related valid case also ICEs, but down to r6 : $ cat z2.f90 module m interface module subroutine f(n, z) integer, intent(in) :: n real :: z(n) end end interface contains module procedure f z = 1 end procedure end
[Bug fortran/96086] New: ICE in gfc_match_select_rank, at fortran/match.c:6645
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96086 Bug ID: 96086 Summary: ICE in gfc_match_select_rank, at fortran/match.c:6645 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions r10/r11, with a missing attribute allocatable/pointer : $ cat z1.f90 subroutine s class(*) :: x(..) select rank (y => x) end select end $ cat z2.f90 subroutine s type t end type class(t) :: x(..) select rank (y => x) end select end $ cat z3.f90 program p class(*) :: x(..) select rank (y => x) end select end $ gfortran-11-20200705 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbd3bdf crash_signal ../../gcc/toplev.c:328 0x69083d gfc_match_select_rank() ../../gcc/fortran/match.c:6645 0x6af35e match_word ../../gcc/fortran/parse.c:65 0x6af35e decode_statement ../../gcc/fortran/parse.c:429 0x6b0b6a next_free ../../gcc/fortran/parse.c:1280 0x6b0b6a next_statement ../../gcc/fortran/parse.c:1512 0x6b21bb parse_spec ../../gcc/fortran/parse.c:3923 0x6b4f8c parse_progunit ../../gcc/fortran/parse.c:5852 0x6b6a4c gfc_parse_file() ../../gcc/fortran/parse.c:6400 0x70284f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/96085] New: ICE in gfc_finish_var_decl, at fortran/trans-decl.c:694
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96085 Bug ID: 96085 Summary: ICE in gfc_finish_var_decl, at fortran/trans-decl.c:694 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.f90 module m integer, parameter :: a = 1 contains subroutine s assign 2 to a 2 print *, a end end $ cat z2.f90 subroutine sub integer, parameter :: a = 1 call s contains subroutine s assign 2 to a 2 print *, a end end $ gfortran-11-20200705 -c z2.f90 # accepts invalid z2.f90:5:19: 6 | assign 2 to a | 1 Warning: Deleted feature: ASSIGN statement at (1) $ gfortran-11-20200705 -c z1.f90 z1.f90:5:19: 5 | assign 2 to a | 1 Warning: Deleted feature: ASSIGN statement at (1) z1.f90:5:0: 5 | assign 2 to a | internal compiler error: in gfc_finish_var_decl, at fortran/trans-decl.c:694 0x72c269 gfc_finish_var_decl ../../gcc/fortran/trans-decl.c:694 0x72b5c1 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1852 0x73a4b8 gfc_conv_variable ../../gcc/fortran/trans-expr.c:2735 0x7366ca gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8693 0x775a36 gfc_conv_label_variable(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-stmt.c:80 0x775aac gfc_trans_label_assign(gfc_code*) ../../gcc/fortran/trans-stmt.c:104 0x705d97 trans_code ../../gcc/fortran/trans.c:1868 0x72f324 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6840 0x709c49 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2264 0x6b6901 translate_all_program_units ../../gcc/fortran/parse.c:6294 0x6b6901 gfc_parse_file() ../../gcc/fortran/parse.c:6546 0x70284f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/96084] New: ICE in free_expr0, at fortran/expr.c:446
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96084 Bug ID: 96084 Summary: ICE in free_expr0, at fortran/expr.c:446 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- This invalid code produces errors up to name length 61, and gives an ICE (or bailing out) for 62/63. To get a traceback it's better to use a test version (configured with --enable-checking=yes). $ cat z1_61.f90 program p type n234567890123456789012345678901234567890123456789012345678901 integer :: i234567890123456789012345678901234567890123456789012345678901 end type dimension a234567890123456789012345678901234567890123456789012345678901(1) class (n234567890123456789012345678901234567890123456789012345678901), allocatable :: & a234567890123456789012345678901234567890123456789012345678901, & b234567890123456789012345678901234567890123456789012345678901 call s(b234567890123456789012345678901234567890123456789012345678901 % & j234567890123456789012345678901234567890123456789012345678901) end $ cat z1_62.f90 program p type n2345678901234567890123456789012345678901234567890123456789012 integer :: i2345678901234567890123456789012345678901234567890123456789012 end type dimension a2345678901234567890123456789012345678901234567890123456789012(1) class (n2345678901234567890123456789012345678901234567890123456789012), allocatable :: & a2345678901234567890123456789012345678901234567890123456789012, & b2345678901234567890123456789012345678901234567890123456789012 call s(b2345678901234567890123456789012345678901234567890123456789012 % & j2345678901234567890123456789012345678901234567890123456789012) end $ cat z1_63.f90 program p type n23456789012345678901234567890123456789012345678901234567890123 integer :: i23456789012345678901234567890123456789012345678901234567890123 end type dimension a23456789012345678901234567890123456789012345678901234567890123(1) class (n23456789012345678901234567890123456789012345678901234567890123), allocatable :: & a23456789012345678901234567890123456789012345678901234567890123, & b23456789012345678901234567890123456789012345678901234567890123 call s(b23456789012345678901234567890123456789012345678901234567890123 % & j23456789012345678901234567890123456789012345678901234567890123) end $ gfortran-11-20200705 -c z1_63.f90 z1_63.f90:10:74: 10 | j23456789012345678901234567890123456789012345678901234567890123) | 1 Error: 'j23456789012345678901234567890123456789012345678901234567890123' at (1) is not a member of the 'n23456789012345678901234567890123456789012345678901234567890123' structure; did you mean 'i23456789012345678901234567890123456789012345678901234567890123'? z1_63.f90:5:76: 5 |dimension a23456789012345678901234567890123456789012345678901234567890123(1) | 1 Error: Allocatable array 'a23456789012345678901234567890123456789012345678901234567890123' at (1) must have a deferred shape or assumed rank f951: internal compiler error: Segmentation fault 0xd6980f crash_signal ../../gcc/toplev.c:328 0x699981 free_expr0 ../../gcc/fortran/expr.c:446 0x699ae8 gfc_free_expr(gfc_expr*) ../../gcc/fortran/expr.c:530 0x666721 gfc_free_array_spec(gfc_array_spec*) ../../gcc/fortran/array.c:351 0x73364f free_components ../../gcc/fortran/symbol.c:2605 0x73364f gfc_free_symbol(gfc_symbol*) ../../gcc/fortran/symbol.c:3077 0x73383e free_sym_tree ../../gcc/fortran/symbol.c:3902 0x73382c free_sym_tree ../../gcc/fortran/symbol.c:3899 0x73382c free_sym_tree ../../gcc/fortran/symbol.c:3899 0x73382c free_sym_tree ../../gcc/fortran/symbol.c:3899 0x73382c free_sym_tree ../../gcc/fortran/symbol.c:3899 0x7334b1 gfc_free_namespace(gfc_namespace*) ../../gcc/fortran/symbol.c:4041 0x733aea gfc_symbol_done_2() ../../gcc/fortran/symbol.c:4101 0x6d1e18 gfc_done_2() ../../gcc/fortran/misc.c:358 0x6f5fa0 translate_all_program_units ../../gcc/fortran/parse.c:6326 0x6f5fa0 gfc_parse_file() ../../gcc/fortran/parse.c:6546 0x74269f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95109] [11 regression] ICE in gfortran.dg/gomp/target1.f90 after r11-349
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95109 --- Comment #6 from G. Steinmetz --- And reducing especially the directives : $ cat z1.f90 program p !$omp target data map(tofrom:n,r) !$omp target teams reduction(+:r) !$omp distribute parallel do simd collapse(2) do i = 1, 10 do j = 1, 10 end do end do !$omp end target teams !$omp end target data end
[Bug fortran/96025] [9/10/11 Regression] ICE in expr_check_typed_help, at fortran/expr.c:5437
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96025 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-invalid-code --- Comment #1 from G. Steinmetz --- Also related : $ cat z2.f90 module m contains character(char(1)) function f() f = 'f' end end program p use m print *, f() end $ gfortran-11-20200628 -c z2.f90 f951: internal compiler error: in gfc_traverse_expr, at fortran/expr.c:5269 0x65fcbf gfc_traverse_expr(gfc_expr*, gfc_symbol*, bool (*)(gfc_expr*, gfc_symbol*, int*), int) ../../gcc/fortran/expr.c:5269 0x65fa01 gfc_traverse_expr(gfc_expr*, gfc_symbol*, bool (*)(gfc_expr*, gfc_symbol*, int*), int) ../../gcc/fortran/expr.c:5219 0x65ff5e gfc_expr_check_typed(gfc_expr*, gfc_namespace*, bool) ../../gcc/fortran/expr.c:5475 0x6b13af parse_spec ../../gcc/fortran/parse.c:3829 0x6b3f0c parse_progunit ../../gcc/fortran/parse.c:5852 0x6b42f1 parse_contained ../../gcc/fortran/parse.c:5753 0x6b5127 parse_module ../../gcc/fortran/parse.c:6126 0x6b5457 gfc_parse_file() ../../gcc/fortran/parse.c:6429 0x7016ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/96025] New: [9/10/11 Regression] ICE in expr_check_typed_help, at fortran/expr.c:5437
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96025 Bug ID: 96025 Summary: [9/10/11 Regression] ICE in expr_check_typed_help, at fortran/expr.c:5437 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to r6, similar to pr96024 : $ cat z1.f90 program p print *, f() contains character(char(1)) function f() f = 'f' end end $ gfortran-5 -c z1.f90 z1.f90:4:13: character(char(1)) function f() 1 Error: Expression at (1) must be of INTEGER type, found CHARACTER $ gfortran-11-20200628 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbd215f crash_signal ../../gcc/toplev.c:328 0x6592b0 expr_check_typed_help ../../gcc/fortran/expr.c:5437 0x65f90d gfc_traverse_expr(gfc_expr*, gfc_symbol*, bool (*)(gfc_expr*, gfc_symbol*, int*), int) ../../gcc/fortran/expr.c:5212 0x65f956 gfc_traverse_expr(gfc_expr*, gfc_symbol*, bool (*)(gfc_expr*, gfc_symbol*, int*), int) ../../gcc/fortran/expr.c:5262 0x65fa01 gfc_traverse_expr(gfc_expr*, gfc_symbol*, bool (*)(gfc_expr*, gfc_symbol*, int*), int) ../../gcc/fortran/expr.c:5219 0x65ff5e gfc_expr_check_typed(gfc_expr*, gfc_namespace*, bool) ../../gcc/fortran/expr.c:5475 0x6b13af parse_spec ../../gcc/fortran/parse.c:3829 0x6b3f0c parse_progunit ../../gcc/fortran/parse.c:5852 0x6b42f1 parse_contained ../../gcc/fortran/parse.c:5753 0x6b4196 parse_progunit ../../gcc/fortran/parse.c:5924 0x6b55e9 gfc_parse_file() ../../gcc/fortran/parse.c:6393 0x7016ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/96024] New: [9/10/11 Regression] ICE in mio_name_expr_t, at fortran/module.c:2159
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96024 Bug ID: 96024 Summary: [9/10/11 Regression] ICE in mio_name_expr_t, at fortran/module.c:2159 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- This invalid code (character char(n) is not a legal len value) gives an ICE down to r6, seems to be accepted by r5 : $ cat z1.f90 module m type t character(char(1)) :: a end type type(t) :: z = t('a') end $ gfortran-5 -c z1.f90 $ $ gfortran-11-20200628 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbd215f crash_signal ../../gcc/toplev.c:328 0x696d8c mio_name_expr_t ../../gcc/fortran/module.c:2159 0x696d8c mio_expr ../../gcc/fortran/module.c:3567 0x697543 mio_charlen ../../gcc/fortran/module.c:2629 0x69763c mio_typespec ../../gcc/fortran/module.c:2687 0x696da0 mio_expr ../../gcc/fortran/module.c:3586 0x697543 mio_charlen ../../gcc/fortran/module.c:2629 0x69763c mio_typespec ../../gcc/fortran/module.c:2687 0x6979c5 mio_component ../../gcc/fortran/module.c:2920 0x6989da mio_component_list ../../gcc/fortran/module.c:2957 0x6989da mio_symbol ../../gcc/fortran/module.c:4416 0x698e3d write_symbol ../../gcc/fortran/module.c:5771 0x698fa2 write_symbol0 ../../gcc/fortran/module.c:5811 0x698f18 write_symbol0 ../../gcc/fortran/module.c:5790 0x698f18 write_symbol0 ../../gcc/fortran/module.c:5790 0x69bb04 write_module ../../gcc/fortran/module.c:6153 0x69bb04 dump_module ../../gcc/fortran/module.c:6283 0x69becd gfc_dump_module(char const*, int) ../../gcc/fortran/module.c:6340 0x6b5d26 gfc_parse_file() ../../gcc/fortran/parse.c:6457 0x7016ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95613] ICE in main_block_label, at tree-cfg.c:1455
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95613 --- Comment #3 from G. Steinmetz --- And for the sake of completeness, with another incarnation of goto : $ cat zz2.f90 # etc. program p select case (0) 2 end select stop call s(*2) end
[Bug fortran/96013] ICE in write_symbol, at fortran/module.c:5747
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96013 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-valid-code --- Comment #1 from G. Steinmetz --- This variant (also legal) compiles : $ cat zz3.f90 module m type t character, allocatable :: a end type contains function f() result(t) character(3) :: c c = 'abc' t = 1.0 end end $ gfortran-11-20200628 -c zz3.f90 $
[Bug fortran/96013] New: ICE in write_symbol, at fortran/module.c:5747
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96013 Bug ID: 96013 Summary: ICE in write_symbol, at fortran/module.c:5747 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.f90 module m type t end type contains function f() result(t) character(3) :: c c = 'abc' end end $ gfortran-11-20200628 -c z1.f90 ' Segmentation fault 0xbd215f crash_signal ../../gcc/toplev.c:328 0x61891e pp_quoted_string ../../gcc/pretty-print.c:1845 0x1504b93 pp_format(pretty_printer*, text_info*) ../../gcc/pretty-print.c:1359 0x14f96df diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) ../../gcc/diagnostic.c:1159 0x657489 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x658baa gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1402 0x698e80 write_symbol ../../gcc/fortran/module.c:5747 0x698ecb write_symbol1_recursion ../../gcc/fortran/module.c:5974 0x69bb35 write_symbol1 ../../gcc/fortran/module.c:6007 0x69bb35 write_module ../../gcc/fortran/module.c:6154 0x69bb35 dump_module ../../gcc/fortran/module.c:6283 0x69becd gfc_dump_module(char const*, int) ../../gcc/fortran/module.c:6340 0x6b5d26 gfc_parse_file() ../../gcc/fortran/parse.c:6457 0x7016ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/96012] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96012 Bug ID: 96012 Summary: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20181014 and 20181021, affects versions down to r8 : $ cat z1.f90 program p type t end type class(*), allocatable :: x(:) x = [t()] end $ cat z2.f90 program p type t integer :: a end type class(*), allocatable :: x(:) x = [t(1)] end $ gfortran-7 -c z1.f90 $ $ gfortran-11-20200628 -c z1.f90 z1.f90:5:0: 5 |x = [t()] | internal compiler error: in fold_convert_loc, at fold-const.c:2558 0x900033 fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gcc/fold-const.c:2558 0x705f6a gfc_allocate_using_malloc(stmtblock_t*, tree_node*, tree_node*, tree_node*) ../../gcc/fortran/trans.c:714 0x7456ab trans_class_assignment ../../gcc/fortran/trans-expr.c:10649 0x7456ab gfc_trans_assignment_1 ../../gcc/fortran/trans-expr.c:11042 0x704c37 trans_code ../../gcc/fortran/trans.c:1864 0x72e1d4 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6840 0x6b5cb6 translate_all_program_units ../../gcc/fortran/parse.c:6307 0x6b5cb6 gfc_parse_file() ../../gcc/fortran/parse.c:6546 0x7016ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/96011] New: ICE in check_function_name, at fortran/decl.c:2429
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96011 Bug ID: 96011 Summary: ICE in check_function_name, at fortran/decl.c:2429 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Seems to be an old issue : $ cat z1.f90 program p contains type(t) function f() external f.n end end $ cat z2.f90 program p type t end type contains type(t) function f() external f.n end end $ gfortran-6 -c z2.f90 -g z2.f90:6:16: external f.n 1 Error: Function name 'f' not allowed at (1) $ gfortran-11-20200628 -std=f2018 -c z1.f90# or with -g etc. 0x657422 gfc_format_decoder ../../gcc/fortran/error.c:970 0x1504fce pp_format(pretty_printer*, text_info*) ../../gcc/pretty-print.c:1475 0x14f96df diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) ../../gcc/diagnostic.c:1159 0x657489 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x65759b gfc_error_opt ../../gcc/fortran/error.c:1352 0x658aa0 gfc_error(char const*, ...) ../../gcc/fortran/error.c:1381 0x63e415 check_function_name ../../gcc/fortran/decl.c:2429 0x6402c2 attr_decl1 ../../gcc/fortran/decl.c:8539 0x6402c2 attr_decl ../../gcc/fortran/decl.c:8683 0x6aacb1 match_word ../../gcc/fortran/parse.c:65 0x6aecfd decode_statement ../../gcc/fortran/parse.c:488 0x6afaea next_free ../../gcc/fortran/parse.c:1280 0x6afaea next_statement ../../gcc/fortran/parse.c:1512 0x6b121d parse_spec ../../gcc/fortran/parse.c:3939 0x6b3f0c parse_progunit ../../gcc/fortran/parse.c:5852 0x6b42f1 parse_contained ../../gcc/fortran/parse.c:5753 0x6b4196 parse_progunit ../../gcc/fortran/parse.c:5924 0x6b55e9 gfc_parse_file() ../../gcc/fortran/parse.c:6393 0x7016ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95981] New: ICE in gfc_find_array_ref(): No ref found
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95981 Bug ID: 95981 Summary: ICE in gfc_find_array_ref(): No ref found Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects also versions down to at least r5. With a missing attribute allocatable or pointer : $ cat z1.f90 program p type t end type class(t) :: x(:) type(t) :: y(size(x,1)) end $ gfortran-11-20200628 -c z1.f90 f951: internal compiler error: gfc_find_array_ref(): No ref found 0x657489 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x658baa gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1402 0x628e4c gfc_find_array_ref(gfc_expr*, bool) ../../gcc/fortran/array.c:2750 0x629f7a dim_rank_check ../../gcc/fortran/check.c:1145 0x6317fc dim_rank_check ../../gcc/fortran/check.c:5140 0x6317fc gfc_check_size(gfc_expr*, gfc_expr*, gfc_expr*) ../../gcc/fortran/check.c:5135 0x66cf6c do_check ../../gcc/fortran/intrinsic.c:4749 0x66cf6c check_specific ../../gcc/fortran/intrinsic.c:4762 0x677264 gfc_intrinsic_func_interface(gfc_expr*, int) ../../gcc/fortran/intrinsic.c:4999 0x6c52d3 resolve_unknown_f ../../gcc/fortran/resolve.c:2902 0x6c52d3 resolve_function ../../gcc/fortran/resolve.c:3246 0x6c52d3 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7037 0x64a4af variable_decl ../../gcc/fortran/decl.c:2595 0x64a4af gfc_match_data_decl() ../../gcc/fortran/decl.c:6197 0x6ae0a3 match_word ../../gcc/fortran/parse.c:65 0x6ae0a3 decode_statement ../../gcc/fortran/parse.c:376 0x6afaea next_free ../../gcc/fortran/parse.c:1280 0x6afaea next_statement ../../gcc/fortran/parse.c:1512 0x6b113b parse_spec ../../gcc/fortran/parse.c:3923 0x6b3f0c parse_progunit ../../gcc/fortran/parse.c:5852
[Bug fortran/95980] ICE in get_unique_type_string, at fortran/class.c:485
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95980 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-invalid-code --- Comment #1 from G. Steinmetz --- Related (and presumably also pr86551) : $ cat z2.f90 program p type t end type class(t) :: x select type (y => x) end select end $ gfortran-11-20200628 -c z2.f90 f951: internal compiler error: Segmentation fault 0xbd215f crash_signal ../../gcc/toplev.c:328 0x686d9b copy_ts_from_selector_to_associate ../../gcc/fortran/match.c:6162 0x68f543 gfc_match_select_type() ../../gcc/fortran/match.c:6422 0x6ae2b4 match_word ../../gcc/fortran/parse.c:65 0x6ae2b4 decode_statement ../../gcc/fortran/parse.c:428 0x6afaea next_free ../../gcc/fortran/parse.c:1280 0x6afaea next_statement ../../gcc/fortran/parse.c:1512 0x6b113b parse_spec ../../gcc/fortran/parse.c:3923 0x6b3f0c parse_progunit ../../gcc/fortran/parse.c:5852 0x6b55e9 gfc_parse_file() ../../gcc/fortran/parse.c:6393 0x7016ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95980] New: ICE in get_unique_type_string, at fortran/class.c:485
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95980 Bug ID: 95980 Summary: ICE in get_unique_type_string, at fortran/class.c:485 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5. With a missing attribute allocatable or pointer : $ cat z1.f90 program p type t integer :: a end type class(t) :: x select type (y => x) end select end $ gfortran-11-20200628 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbd215f crash_signal ../../gcc/toplev.c:328 0x63535a get_unique_type_string ../../gcc/fortran/class.c:485 0x635de1 get_unique_hashed_string ../../gcc/fortran/class.c:522 0x6392ce gfc_build_class_symbol(gfc_typespec*, symbol_attribute*, gfc_array_spec**) ../../gcc/fortran/class.c:666 0x68f543 gfc_match_select_type() ../../gcc/fortran/match.c:6422 0x6ae2b4 match_word ../../gcc/fortran/parse.c:65 0x6ae2b4 decode_statement ../../gcc/fortran/parse.c:428 0x6afaea next_free ../../gcc/fortran/parse.c:1280 0x6afaea next_statement ../../gcc/fortran/parse.c:1512 0x6b113b parse_spec ../../gcc/fortran/parse.c:3923 0x6b3f0c parse_progunit ../../gcc/fortran/parse.c:5852 0x6b55e9 gfc_parse_file() ../../gcc/fortran/parse.c:6393 0x7016ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95979] New: [10/11 Regression] ICE in get_kind, at fortran/simplify.c:129
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95979 Bug ID: 95979 Summary: [10/11 Regression] ICE in get_kind, at fortran/simplify.c:129 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20191215 and 20200105 : $ cat z1.f90 program p integer :: a = index('abcd', 'c', [.true.], kind=1) end $ cat z2.f90 program p integer :: a = index('abcd', 'c', [.true.], kind=4) end $ cat z3.f90 program p integer :: a(1) = index('abcd', 'c', [.true.]) integer :: b(1) = index('abcd', 'c', [.true.], kind=1) print *, a print *, b end $ gfortran-10-20191215 -c z1.f90 z1.f90:2:15: 2 |integer :: a = index('abcd', 'c', [.true.], kind=1) | 1 Error: Incompatible ranks 0 and 1 in assignment at (1) $ gfortran-11-20200628 -c z1.f90 0xbd215f crash_signal ../../gcc/toplev.c:328 0x65730f gfc_format_decoder ../../gcc/fortran/error.c:981 0x1504fce pp_format(pretty_printer*, text_info*) ../../gcc/pretty-print.c:1475 0x14f96df diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) ../../gcc/diagnostic.c:1159 0x657489 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x65759b gfc_error_opt ../../gcc/fortran/error.c:1352 0x658aa0 gfc_error(char const*, ...) ../../gcc/fortran/error.c:1381 0x6db27a get_kind ../../gcc/fortran/simplify.c:129 0x6e4ce1 gfc_simplify_index(gfc_expr*, gfc_expr*, gfc_expr*, gfc_expr*) ../../gcc/fortran/simplify.c:3479 0x66c997 do_simplify ../../gcc/fortran/intrinsic.c:4634 0x677178 gfc_intrinsic_func_interface(gfc_expr*, int) ../../gcc/fortran/intrinsic.c:4899 0x65d5f9 gfc_simplify_expr(gfc_expr*, int) ../../gcc/fortran/expr.c:2180 0x65e03a scalarize_intrinsic_call ../../gcc/fortran/expr.c:2422 0x65c82b gfc_check_init_expr(gfc_expr*) ../../gcc/fortran/expr.c:2934 0x65cb07 gfc_reduce_init_expr(gfc_expr*) ../../gcc/fortran/expr.c:3087 0x65fd70 gfc_match_init_expr(gfc_expr**) ../../gcc/fortran/expr.c:3133 0x64b5f4 variable_decl ../../gcc/fortran/decl.c:2886 0x64b5f4 gfc_match_data_decl() ../../gcc/fortran/decl.c:6197 0x6ae0a3 match_word ../../gcc/fortran/parse.c:65 0x6ae0a3 decode_statement ../../gcc/fortran/parse.c:376
[Bug fortran/95978] New: [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95978 Bug ID: 95978 Summary: [10/11 Regression] ICE in gfc_match_data, at fortran/decl.c:731 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- This changed between 20200223 and 20200308 : $ cat z1.f90 program p type t integer :: a type(t), allocatable :: b data c /t(1)/ end type end $ cat z2.f90 program p type t integer :: a class(*), allocatable :: b data c /t(1)/ end type end $ gfortran-10-20200223 -c z1.f90 z1.f90:5:19: 5 | data c /t(1)/ | 1 Error: Unexpected DATA statement at (1) $ gfortran-11-20200628 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbd215f crash_signal ../../gcc/toplev.c:328 0x6419e5 gfc_match_data() ../../gcc/fortran/decl.c:731 0x6aacb1 match_word ../../gcc/fortran/parse.c:65 0x6aed7e decode_statement ../../gcc/fortran/parse.c:469 0x6afaea next_free ../../gcc/fortran/parse.c:1280 0x6afaea next_statement ../../gcc/fortran/parse.c:1512 0x6b1574 parse_derived ../../gcc/fortran/parse.c:3343 0x6b1574 parse_spec ../../gcc/fortran/parse.c:3884 0x6b3f0c parse_progunit ../../gcc/fortran/parse.c:5852 0x6b55e9 gfc_parse_file() ../../gcc/fortran/parse.c:6393 0x7016ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95882] [9/10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95882 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-invalid-code --- Comment #1 from G. Steinmetz --- Related, with different backtraces : $ cat z2.f90 module m character(((0)/0)) :: c = '123456789' end $ cat z3.f90 subroutine s(c) character(((0)/0)) :: c end $ cat z4.f90 program p character(((0)/0)) :: c common /x/ c end $ cat z5.f90 program p character(((0)/0)) :: c = '123456789' common c end
[Bug fortran/95882] New: [9/10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95882 Bug ID: 95882 Summary: [9/10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20200517 and 20200524 : $ cat z1.f90 module m type t character(((0)/0)) :: c end type end $ gfortran-11-20200517 -c z1.f90 z1.f90:3:22: 3 | character(((0)/0)) :: c | 1 Error: Division by zero at (1) $ gfortran-11-20200621 -c z1.f90 f951: internal compiler error: in gfc_get_derived_type, at fortran/trans-types.c:2729 0x784843 gfc_get_derived_type(gfc_symbol*, int) ../../gcc/fortran/trans-types.c:2729 0x784b68 gfc_typenode_for_spec(gfc_typespec*, int) ../../gcc/fortran/trans-types.c:1166 0x784dbe gfc_sym_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:2247 0x729616 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1769 0x72c888 gfc_create_module_variable ../../gcc/fortran/trans-decl.c:5302 0x6ebde2 do_traverse_symtree ../../gcc/fortran/symbol.c:4162 0x72d08b gfc_generate_module_vars(gfc_namespace*) ../../gcc/fortran/trans-decl.c:5801 0x707ca4 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2238 0x6b4b01 translate_all_program_units ../../gcc/fortran/parse.c:6294 0x6b4b01 gfc_parse_file() ../../gcc/fortran/parse.c:6546 0x70098f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95881] New: [9/10/11 Regression] ICE in resolve_symbol, at fortran/resolve.c:15175
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95881 Bug ID: 95881 Summary: [9/10/11 Regression] ICE in resolve_symbol, at fortran/resolve.c:15175 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to r7, with a missing attribute : $ cat z1.f90 program p type t real, allocatable :: a[:] end type class(t) :: x allocate (x%a[*]) end $ cat z2.f90 subroutine s(x) type t real, allocatable :: a[:] end type block class(t) :: x allocate (x%a[*]) end block end $ gfortran-6 -c z1.f90 -fcoarray=lib z1.f90:5:16: class(t) :: x 1 Error: CLASS variable 'x' at (1) must be dummy, allocatable or pointer $ gfortran-11-20200621 -c z1.f90 -fcoarray=single z1.f90:5:16: 5 |class(t) :: x |1 Error: CLASS variable 'x' at (1) must be dummy, allocatable or pointer $ gfortran-11-20200621 -c z1.f90 -fcoarray=lib f951: internal compiler error: Segmentation fault 0xbce57f crash_signal ../../gcc/toplev.c:328 0x6cda25 resolve_symbol ../../gcc/fortran/resolve.c:15175 0x6ebde2 do_traverse_symtree ../../gcc/fortran/symbol.c:4162 0x6d1094 resolve_types ../../gcc/fortran/resolve.c:17175 0x6cc7ac gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17290 0x6b48ec resolve_all_program_units ../../gcc/fortran/parse.c:6246 0x6b48ec gfc_parse_file() ../../gcc/fortran/parse.c:6493 0x70098f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95880] New: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95880 Bug ID: 95880 Summary: [9/10/11 Regression] ICE in gfc_add_type, at fortran/symbol.c:2030 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to r8, started between 20200517 and 20200524 : $ cat z1.f90 module m end block data use m integer m end block data $ cat z5.f90 module m type t end type end block data use m type(t) m end block data $ gfortran-11-20200517 -c z1.f90 z1.f90:5:12: 5 |integer m |1 Error: Symbol 'm' at (1) cannot have a type $ gfortran-11-20200621 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbce57f crash_signal ../../gcc/toplev.c:328 0x6f02bc gfc_add_type(gfc_symbol*, gfc_typespec*, locus*) ../../gcc/fortran/symbol.c:2030 0x63eeed build_sym ../../gcc/fortran/decl.c:1685 0x649969 variable_decl ../../gcc/fortran/decl.c:2793 0x649969 gfc_match_data_decl() ../../gcc/fortran/decl.c:6195 0x6ad323 match_word ../../gcc/fortran/parse.c:65 0x6ad323 decode_statement ../../gcc/fortran/parse.c:376 0x6aed6a next_free ../../gcc/fortran/parse.c:1280 0x6aed6a next_statement ../../gcc/fortran/parse.c:1512 0x6b03bb parse_spec ../../gcc/fortran/parse.c:3923 0x6b4e30 parse_block_data ../../gcc/fortran/parse.c:6026 0x6b4e30 gfc_parse_file() ../../gcc/fortran/parse.c:6413 0x70098f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95879] [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-invalid-code --- Comment #1 from G. Steinmetz --- While not embedded : $ cat y1.f90 module m contains integer function f(x) bind(c) use iso_c_binding c_funloc(f) = x end end $ cat y2.f90 module m contains integer function f(x) use iso_c_binding c_funloc(f) = x end end $ gfortran-11-20200621 -c y2.f90 y2.f90:5:15: 5 | c_funloc(f) = x | 1 Error: Function result 'f' at (1) is invalid as X argument to C_FUNLOC
[Bug fortran/95879] New: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95879 Bug ID: 95879 Summary: [10/11 Regression] ICE in gfc_get_derived_type, at fortran/trans-types.c:2729 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20190630 and 20190728 : $ cat z1.f90 module m contains integer function f(x) bind(c) use iso_c_binding contains subroutine s c_funloc(f) = x end end end $ cat z2.f90 module m contains integer function f(x) use iso_c_binding contains subroutine s c_funloc(f) = x end end end $ gfortran-10-20190630 -c z1.f90 $ $ gfortran-11-20200621 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbce57f crash_signal ../../gcc/toplev.c:328 0x6d07a5 gfc_resolve_formal_arglist(gfc_symbol*) ../../gcc/fortran/resolve.c:313 0x6ebde2 do_traverse_symtree ../../gcc/fortran/symbol.c:4162 0x6d0fc3 resolve_formal_arglists ../../gcc/fortran/resolve.c:563 0x6d0fc3 resolve_contained_functions ../../gcc/fortran/resolve.c:1129 0x6d0fc3 resolve_types ../../gcc/fortran/resolve.c:17164 0x6d11a0 resolve_types ../../gcc/fortran/resolve.c:17186 0x6d11a0 resolve_types ../../gcc/fortran/resolve.c:17186 0x6cc7ac gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17290 0x6b46f2 gfc_parse_file() ../../gcc/fortran/parse.c:6448 0x70098f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95829] New: Bogus error with additional blanks in type(*)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95829 Bug ID: 95829 Summary: Bogus error with additional blanks in type(*) Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.f90 subroutine s(x) type( * ) :: x end $ cat z2.f90 subroutine s (a, b, c, d, e, f, g) type(*) :: a type(* ) :: b type( *) :: c type( * ) :: d type(* ) :: e type( *) :: f type( * ) :: g end $ gfortran-11-20200621 -c z1.f90 z1.f90:2:4: 2 |type( * ) :: x |1 Error: Unclassifiable statement at (1)
[Bug fortran/95828] New: ICE in resolve_select_rank, at fortran/resolve.c:9774
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95828 Bug ID: 95828 Summary: ICE in resolve_select_rank, at fortran/resolve.c:9774 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Happens between name length 58 (ok) and 59 (ICE) : $ cat z1_58.f90 module m234567890123456789012345678901234567890123456789012345678 type t234567890123456789012345678901234567890123456789012345678 end type contains subroutine s234567890123456789012345678901234567890123456789012345678 & (x234567890123456789012345678901234567890123456789012345678) type(t234567890123456789012345678901234567890123456789012345678) :: & x234567890123456789012345678901234567890123456789012345678(..) select rank (y234567890123456789012345678901234567890123456789012345678 & => x234567890123456789012345678901234567890123456789012345678) rank (2) rank (3) rank default end select end end $ cat z1_59.f90 module m2345678901234567890123456789012345678901234567890123456789 type t2345678901234567890123456789012345678901234567890123456789 end type contains subroutine s2345678901234567890123456789012345678901234567890123456789 & (x2345678901234567890123456789012345678901234567890123456789) type(t2345678901234567890123456789012345678901234567890123456789) :: & x2345678901234567890123456789012345678901234567890123456789(..) select rank (y2345678901234567890123456789012345678901234567890123456789 & => x2345678901234567890123456789012345678901234567890123456789) rank (2) rank (3) rank default end select end end $ cat z1_63.f90 module m23456789012345678901234567890123456789012345678901234567890123 type t23456789012345678901234567890123456789012345678901234567890123 end type contains subroutine s23456789012345678901234567890123456789012345678901234567890123 & (x23456789012345678901234567890123456789012345678901234567890123) type(t23456789012345678901234567890123456789012345678901234567890123) :: & x23456789012345678901234567890123456789012345678901234567890123(..) select rank (y23456789012345678901234567890123456789012345678901234567890123 & => x23456789012345678901234567890123456789012345678901234567890123) rank (2) rank (3) rank default end select end end $ gfortran-11-20200621 -c z1_58.f90 $ $ gfortran-11-20200621 -c z1_59.f90 f951: internal compiler error: Segmentation fault 0xbce57f crash_signal ../../gcc/toplev.c:328 0x6cb511 resolve_select_rank ../../gcc/fortran/resolve.c:9774 0x6cb511 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11973 0x6cc6f7 resolve_codes ../../gcc/fortran/resolve.c:17257 0x6cc62e resolve_codes ../../gcc/fortran/resolve.c:17240 0x6cc7be gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17292 0x6b46f2 gfc_parse_file() ../../gcc/fortran/parse.c:6448 0x70098f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95827] New: ICE in gfc_get_string, at fortran/iresolve.c:70
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95827 Bug ID: 95827 Summary: ICE in gfc_get_string, at fortran/iresolve.c:70 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Happens between name length 59 (ok) and 60 (ICE) : $ cat z1_59.f90 module m2345678901234567890123456789012345678901234567890123456789 interface module subroutine s2345678901234567890123456789012345678901234567890123456789 end end interface end submodule(m2345678901234567890123456789012345678901234567890123456789) & n2345678901234567890123456789012345678901234567890123456789 integer :: x2345678901234567890123456789012345678901234567890123456789[*] end $ cat z1_60.f90 module m23456789012345678901234567890123456789012345678901234567890 interface module subroutine s23456789012345678901234567890123456789012345678901234567890 end end interface end submodule(m23456789012345678901234567890123456789012345678901234567890) & n23456789012345678901234567890123456789012345678901234567890 integer :: x23456789012345678901234567890123456789012345678901234567890[*] end $ cat z1_63.f90 module m23456789012345678901234567890123456789012345678901234567890123 interface module subroutine s23456789012345678901234567890123456789012345678901234567890123 end end interface end submodule(m23456789012345678901234567890123456789012345678901234567890123) & n23456789012345678901234567890123456789012345678901234567890123 integer :: x23456789012345678901234567890123456789012345678901234567890123[*] end $ gfortran-11-20200621 -c z1_59.f90 -fcoarray=lib $ $ gfortran-11-20200621 -c z1_60.f90 -fcoarray=lib f951: internal compiler error: identifier overflow: 200 0x695169 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x69688a gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1402 0x6be1d7 gfc_get_string(char const*, ...) ../../gcc/fortran/iresolve.c:70 0x773c16 gfc_build_qualified_array ../../gcc/fortran/trans-decl.c:994 0x7761bc gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1795 0x77a340 gfc_create_module_variable ../../gcc/fortran/trans-decl.c:5302 0x72ab12 do_traverse_symtree ../../gcc/fortran/symbol.c:4162 0x77ae1b gfc_generate_module_vars(gfc_namespace*) ../../gcc/fortran/trans-decl.c:5801 0x748fc1 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2238 0x6f3831 translate_all_program_units ../../gcc/fortran/parse.c:6294 0x6f3831 gfc_parse_file() ../../gcc/fortran/parse.c:6546 0x74021f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95826] New: ICE in gfc_match_decl_type_spec, at fortran/decl.c:4290
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95826 Bug ID: 95826 Summary: ICE in gfc_match_decl_type_spec, at fortran/decl.c:4290 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Moving on, this happens between name length 60 (ok) and 61 (ICE) : $ cat z1_60.f90 program p type t23456789012345678901234567890123456789012345678901234567890 & (a23456789012345678901234567890123456789012345678901234567890, & b23456789012345678901234567890123456789012345678901234567890) integer, kind :: a23456789012345678901234567890123456789012345678901234567890 integer, len :: b23456789012345678901234567890123456789012345678901234567890 end type integer, parameter :: n23456789012345678901234567890123456789012345678901234567890 = 16 type (t23456789012345678901234567890123456789012345678901234567890 & (n23456789012345678901234567890123456789012345678901234567890, :)), & allocatable :: x23456789012345678901234567890123456789012345678901234567890 end $ cat z1_61.f90 program p type t234567890123456789012345678901234567890123456789012345678901 & (a234567890123456789012345678901234567890123456789012345678901, & b234567890123456789012345678901234567890123456789012345678901) integer, kind :: a234567890123456789012345678901234567890123456789012345678901 integer, len :: b234567890123456789012345678901234567890123456789012345678901 end type integer, parameter :: n234567890123456789012345678901234567890123456789012345678901 = 16 type (t234567890123456789012345678901234567890123456789012345678901 & (n234567890123456789012345678901234567890123456789012345678901, :)), & allocatable :: x234567890123456789012345678901234567890123456789012345678901 end $ cat z1_63.f90 program p type t23456789012345678901234567890123456789012345678901234567890123 & (a23456789012345678901234567890123456789012345678901234567890123, & b23456789012345678901234567890123456789012345678901234567890123) integer, kind :: a23456789012345678901234567890123456789012345678901234567890123 integer, len :: b23456789012345678901234567890123456789012345678901234567890123 end type integer, parameter :: n23456789012345678901234567890123456789012345678901234567890123 = 16 type (t23456789012345678901234567890123456789012345678901234567890123 & (n23456789012345678901234567890123456789012345678901234567890123, :)), & allocatable :: x23456789012345678901234567890123456789012345678901234567890123 end $ gfortran-11-20200621 -c z1_60.f90 $ $ gfortran-11-20200621 -c z1_61.f90 f951: internal compiler error: in gfc_match_decl_type_spec, at fortran/decl.c:4290 0x64849f gfc_match_decl_type_spec(gfc_typespec*, int) ../../gcc/fortran/decl.c:4290 0x6491dc gfc_match_data_decl() ../../gcc/fortran/decl.c:6124 0x6ad323 match_word ../../gcc/fortran/parse.c:65 0x6ad323 decode_statement ../../gcc/fortran/parse.c:376 0x6aed6a next_free ../../gcc/fortran/parse.c:1280 0x6aed6a next_statement ../../gcc/fortran/parse.c:1512 0x6b03bb parse_spec ../../gcc/fortran/parse.c:3923 0x6b318c parse_progunit ../../gcc/fortran/parse.c:5852 0x6b4869 gfc_parse_file() ../../gcc/fortran/parse.c:6393 0x70098f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95710] New: ICE in gfc_type_is_extensible, at fortran/resolve.c:8848
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95710 Bug ID: 95710 Summary: ICE in gfc_type_is_extensible, at fortran/resolve.c:8848 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to r6, with a doubled declaration : $ cat z1.f90 module m type t integer :: a = 1 end type interface module subroutine s end end interface end submodule(m) m2 contains subroutine s ! or module subroutine s class(t), allocatable :: x class(t), allocatable :: x end end $ cat z2.f90 module m type t integer :: a = 1 end type interface module subroutine s end end interface end submodule(m) m2 contains subroutine s ! or module procedure s class(t), pointer :: x class(t), pointer :: x end end $ cat z3.f90 module m type t integer :: a = 1 end type interface module subroutine s end end interface end submodule(m) m2 contains subroutine s class(t), allocatable :: x class(t), pointer :: x end end $ gfortran-11-20200614 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbcdd2f crash_signal ../../gcc/toplev.c:328 0x5e5861 gfc_type_is_extensible(gfc_symbol*) ../../gcc/fortran/resolve.c:8848 0x5e5861 resolve_fl_var_and_proc ../../gcc/fortran/resolve.c:12658 0x6ce441 resolve_fl_variable ../../gcc/fortran/resolve.c:12774 0x6ce441 resolve_symbol ../../gcc/fortran/resolve.c:15835 0x6eb7d2 do_traverse_symtree ../../gcc/fortran/symbol.c:4162 0x6d0a84 resolve_types ../../gcc/fortran/resolve.c:17175 0x6d0b90 resolve_types ../../gcc/fortran/resolve.c:17186 0x6cc19c gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17290 0x6b40f2 gfc_parse_file() ../../gcc/fortran/parse.c:6447 0x70036f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95709] New: [9/10/11 Regression] ICE in gfc_resolve_code, at fortran/resolve.c:11807
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95709 Bug ID: 95709 Summary: [9/10/11 Regression] ICE in gfc_resolve_code, at fortran/resolve.c:11807 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to r8 (before 20180525), r7 rejects it : $ cat z1.f90 program p integer, parameter :: i(1) = 1 goto i(1) 1 continue end $ cat z2.f90 program p integer, parameter :: i(0) = 0 goto i(1) end $ cat z3.f90 program p integer, parameter :: i(0) = 0 goto i(0) goto i(1) goto i(-1) goto i(i(0)) end $ cat z4.f90 program p integer, parameter :: i(0) = 0 integer :: j goto i%kind goto j%kind goto j%kind, (1) end $ gfortran-11-20200614 -c z1.f90 z1.f90:3:12: 3 |goto i(1) |1 Warning: Deleted feature: Assigned GOTO statement at (1) f951: internal compiler error: Segmentation fault 0xbcdd2f crash_signal ../../gcc/toplev.c:328 0x6c9c8c gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11807 0x6cc0e7 resolve_codes ../../gcc/fortran/resolve.c:17257 0x6cc1ae gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17292 0x6b42ec resolve_all_program_units ../../gcc/fortran/parse.c:6245 0x6b42ec gfc_parse_file() ../../gcc/fortran/parse.c:6492 0x70036f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95708] New: [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95708 Bug ID: 95708 Summary: [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Special case "team_number" gives an ICE down to r8, r7 rejects it : $ cat z0.f90 program p procedure(num_images) :: g end $ cat z1.f90 program p procedure(team_number) :: g end $ gfortran-11-20200614 -c z0.f90 z0.f90:2:29: 2 |procedure(num_images) :: g | 1 Error: Intrinsic procedure 'num_images' not allowed in PROCEDURE statement at (1) $ gfortran-11-20200614 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbcdd2f crash_signal ../../gcc/toplev.c:328 0x6cf9fb resolve_fl_procedure ../../gcc/fortran/resolve.c:13002 0x6cf9fb resolve_symbol ../../gcc/fortran/resolve.c:15855 0x6cfeca resolve_procedure_interface ../../gcc/fortran/resolve.c:210 0x6cd526 resolve_symbol ../../gcc/fortran/resolve.c:15235 0x6eb7d2 do_traverse_symtree ../../gcc/fortran/symbol.c:4162 0x6d0a84 resolve_types ../../gcc/fortran/resolve.c:17175 0x6cc19c gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17290 0x6b42ec resolve_all_program_units ../../gcc/fortran/parse.c:6245 0x6b42ec gfc_parse_file() ../../gcc/fortran/parse.c:6492 0x70036f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95707] New: ICE in finish_equivalences, at fortran/trans-common.c:1319
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95707 Bug ID: 95707 Summary: ICE in finish_equivalences, at fortran/trans-common.c:1319 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Happens between name length 35 (ok) and 36 (ICE) : $ cat z1_35.f90 module m2345678901234567890123456789012345 interface module subroutine s2345678901234567890123456789012345 end end interface end submodule(m2345678901234567890123456789012345) & n2345678901234567890123456789012345 real :: a(4), u(3,2) real :: b(4), v(4,2) equivalence (a(1),u(1,1)), (b(1),v(1,1)) end $ cat z1_36.f90 module m23456789012345678901234567890123456 interface module subroutine s23456789012345678901234567890123456 end end interface end submodule(m23456789012345678901234567890123456) & n23456789012345678901234567890123456 real :: a(4), u(3,2) real :: b(4), v(4,2) equivalence (a(1),u(1,1)), (b(1),v(1,1)) end $ cat z1_63.f90 module m23456789012345678901234567890123456789012345678901234567890123 interface module subroutine s23456789012345678901234567890123456789012345678901234567890123 end end interface end submodule(m23456789012345678901234567890123456789012345678901234567890123) & n23456789012345678901234567890123456789012345678901234567890123 real :: a(4), u(3,2) real :: b(4), v(4,2) equivalence (a(1),u(1,1)), (b(1),v(1,1)) end $ gfortran-11-20200614 -c z1_35.f90 $ $ gfortran-11-20200614 -c z1_36.f90 f951: internal compiler error: in finish_equivalences, at fortran/trans-common.c:1319 0x71f615 finish_equivalences ../../gcc/fortran/trans-common.c:1319 0x71f615 gfc_trans_common(gfc_namespace*) ../../gcc/fortran/trans-common.c:1363 0x72c977 gfc_generate_module_vars(gfc_namespace*) ../../gcc/fortran/trans-decl.c:5796 0x707684 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2238 0x6b4501 translate_all_program_units ../../gcc/fortran/parse.c:6293 0x6b4501 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x70036f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95690] New: [11 Regression] ICE in set_mem_attributes_minus_bitpos, at emit-rtl.c:2092
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95690 Bug ID: 95690 Summary: [11 Regression] ICE in set_mem_attributes_minus_bitpos, at emit-rtl.c:2092 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20200531 and 20200607 : $ cat z1.f90 module m contains subroutine s print *, (erfc) end function erfc() end end $ gfortran-11-20200531 -c z1.f90 z1.f90:4:0: 4 | print *, (erfc) | Error: initializer for floating value is not a floating constant $ gfortran-11-20200614 -c z1.f90 during RTL pass: expand z1.f90:4:0: 4 | print *, (erfc) | internal compiler error: in set_mem_attributes_minus_bitpos, at emit-rtl.c:2092 0x89d5d0 set_mem_attributes_minus_bitpos(rtx_def*, tree_node*, int, poly_int<1u, long>) ../../gcc/emit-rtl.c:2090 0xe6d8c4 build_constant_desc ../../gcc/varasm.c:3402 0xe6d8c4 add_constant_to_table ../../gcc/varasm.c:3454 0xe6aa2c output_constant_def(tree_node*, int) ../../gcc/varasm.c:3478 0x8d0034 expand_expr_constant ../../gcc/expr.c:8079 0x8d0034 expand_expr_addr_expr_1 ../../gcc/expr.c:8132 0x8c5cbd expand_expr_addr_expr ../../gcc/expr.c:8299 0x8c5cbd expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:11474 0x7bdd80 expand_normal ../../gcc/expr.h:288 0x7bdd80 precompute_register_parameters ../../gcc/calls.c:982 0x7bdd80 expand_call(tree_node*, rtx_def*, int) ../../gcc/calls.c:4337 0x8c662e expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:11246 0x7cba7a expand_expr ../../gcc/expr.h:282 0x7cba7a expand_call_stmt ../../gcc/cfgexpand.c:2703 0x7cba7a expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3682 0x7cba7a expand_gimple_stmt ../../gcc/cfgexpand.c:3847 0x7d0527 expand_gimple_basic_block ../../gcc/cfgexpand.c:5888 0x7d2b9e execute ../../gcc/cfgexpand.c:6572
[Bug fortran/95689] New: ICE in check_sym_interfaces, at fortran/interface.c:2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95689 Bug ID: 95689 Summary: ICE in check_sym_interfaces, at fortran/interface.c:2015 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Happens between name length 37 (ok) and 38 (ICE) : $ cat z1_37.f90 module m234567890123456789012345678901234567 type t234567890123456789012345678901234567 end type interface module subroutine s234567890123456789012345678901234567 & (x234567890123456789012345678901234567) end end interface end submodule(m234567890123456789012345678901234567) & t234567890123456789012345678901234567 end $ cat z1_38.f90 module m2345678901234567890123456789012345678 type t2345678901234567890123456789012345678 end type interface module subroutine s2345678901234567890123456789012345678 & (x2345678901234567890123456789012345678) end end interface end submodule(m2345678901234567890123456789012345678) & t2345678901234567890123456789012345678 end $ cat z1_42.f90 module m23456789012345678901234567890123456789012 type t23456789012345678901234567890123456789012 end type interface module subroutine s23456789012345678901234567890123456789012 & (x23456789012345678901234567890123456789012) end end interface end submodule(m23456789012345678901234567890123456789012) & t23456789012345678901234567890123456789012 end $ cat z1_63.f90 module m23456789012345678901234567890123456789012345678901234567890123 type t23456789012345678901234567890123456789012345678901234567890123 end type interface module subroutine s23456789012345678901234567890123456789012345678901234567890123 & (x23456789012345678901234567890123456789012345678901234567890123) end end interface end submodule(m23456789012345678901234567890123456789012345678901234567890123) & t23456789012345678901234567890123456789012345678901234567890123 end $ gfortran-11-20200614 -c z1_37.f90 $ $ gfortran-11-20200614 -c z1_38.f90 f951: internal compiler error: Segmentation fault 0xd61fdf crash_signal ../../gcc/toplev.c:328 0x72a1d6 do_traverse_symtree ../../gcc/fortran/symbol.c:4163 0x6a40e0 gfc_check_interfaces(gfc_namespace*) ../../gcc/fortran/interface.c:2104 0x70f5bd resolve_types ../../gcc/fortran/resolve.c:17191 0x70ab9c gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17290 0x6f2af2 gfc_parse_file() ../../gcc/fortran/parse.c:6447 0x73f8cf gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212 $ gfortran-11-20200614 -c z1_63.f90 f951: internal compiler error: Segmentation fault 0xd61fdf crash_signal ../../gcc/toplev.c:328 0x6a4040 check_sym_interfaces ../../gcc/fortran/interface.c:2015
[Bug fortran/95688] New: ICE in gfc_get_string, at fortran/iresolve.c:70
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95688 Bug ID: 95688 Summary: ICE in gfc_get_string, at fortran/iresolve.c:70 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Happens between name length 45 (ok) and 46 (ICE) : $ cat z1_45.f90 module m23456789012345678901234567890123456789012345 interface module subroutine s23456789012345678901234567890123456789012345 end end interface end submodule(m23456789012345678901234567890123456789012345) & n23456789012345678901234567890123456789012345 character(:), pointer :: x23456789012345678901234567890123456789012345 => null() end $ cat z1_46.f90 module m234567890123456789012345678901234567890123456 interface module subroutine s234567890123456789012345678901234567890123456 end end interface end submodule(m234567890123456789012345678901234567890123456) & n234567890123456789012345678901234567890123456 character(:), pointer :: x234567890123456789012345678901234567890123456 => null() end $ cat z1_63.f90 module m23456789012345678901234567890123456789012345678901234567890123 interface module subroutine s23456789012345678901234567890123456789012345678901234567890123 end end interface end submodule(m23456789012345678901234567890123456789012345678901234567890123) & n23456789012345678901234567890123456789012345678901234567890123 character(:), pointer :: x23456789012345678901234567890123456789012345678901234567890123 => null() end $ gfortran-11-20200614 -c z1_45.f90 $ $ gfortran-11-20200614 -c z1_46.f90 f951: internal compiler error: identifier overflow: 147 0x6562b9 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x6579da gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1402 0x67f2d7 gfc_get_string(char const*, ...) ../../gcc/fortran/iresolve.c:70 0x720c90 gfc_create_string_length ../../gcc/fortran/trans-decl.c:1353 0x729317 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1765 0x72c188 gfc_create_module_variable ../../gcc/fortran/trans-decl.c:5302 0x6eb7d2 do_traverse_symtree ../../gcc/fortran/symbol.c:4162 0x72c98b gfc_generate_module_vars(gfc_namespace*) ../../gcc/fortran/trans-decl.c:5801 0x707684 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2238 0x6b4501 translate_all_program_units ../../gcc/fortran/parse.c:6293 0x6b4501 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x70036f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95687] New: ICE in get_unique_hashed_string, at fortran/class.c:508
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95687 Bug ID: 95687 Summary: ICE in get_unique_hashed_string, at fortran/class.c:508 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Happens between name length 61 (ok) and 62 (ICE) : $ cat z1_61.f90 module m234567890123456789012345678901234567890123456789012345678901 interface module subroutine s234567890123456789012345678901234567890123456789012345678901 end end interface end submodule(m234567890123456789012345678901234567890123456789012345678901) & n234567890123456789012345678901234567890123456789012345678901 type t234567890123456789012345678901234567890123456789012345678901 & (a234567890123456789012345678901234567890123456789012345678901) integer, kind :: a234567890123456789012345678901234567890123456789012345678901 = 4 end type class(t234567890123456789012345678901234567890123456789012345678901(3)), pointer :: & x234567890123456789012345678901234567890123456789012345678901 end $ cat z1_62.f90 module m2345678901234567890123456789012345678901234567890123456789012 interface module subroutine s2345678901234567890123456789012345678901234567890123456789012 end end interface end submodule(m2345678901234567890123456789012345678901234567890123456789012) & n2345678901234567890123456789012345678901234567890123456789012 type t2345678901234567890123456789012345678901234567890123456789012 & (a2345678901234567890123456789012345678901234567890123456789012) integer, kind :: a2345678901234567890123456789012345678901234567890123456789012 = 4 end type class(t2345678901234567890123456789012345678901234567890123456789012(3)), pointer :: & x2345678901234567890123456789012345678901234567890123456789012 end $ cat z1_63.f90 module m23456789012345678901234567890123456789012345678901234567890123 interface module subroutine s23456789012345678901234567890123456789012345678901234567890123 end end interface end submodule(m23456789012345678901234567890123456789012345678901234567890123) & n23456789012345678901234567890123456789012345678901234567890123 type t23456789012345678901234567890123456789012345678901234567890123 & (a23456789012345678901234567890123456789012345678901234567890123) integer, kind :: a23456789012345678901234567890123456789012345678901234567890123 = 4 end type class(t23456789012345678901234567890123456789012345678901234567890123(3)), pointer :: & x23456789012345678901234567890123456789012345678901234567890123 end $ gfortran-11-20200614 -c z1_61.f90 $ $ gfortran-11-20200614 -c z1_62.f90 f951: internal compiler error: in get_unique_hashed_string, at fortran/class.c:508 0x634d96 get_unique_hashed_string ../../gcc/fortran/class.c:508 0x6381ae gfc_build_class_symbol(gfc_typespec*, symbol_attribute*, gfc_array_spec**) ../../gcc/fortran/class.c:651 0x63ec2c build_sym ../../gcc/fortran/decl.c:1751 0x649519 variable_decl ../../gcc/fortran/decl.c:2793 0x649519 gfc_match_data_decl() ../../gcc/fortran/decl.c:6195 0x6acd23 match_word ../../gcc/fortran/parse.c:65 0x6acd23 decode_statement ../../gcc/fortran/parse.c:376 0x6ae76a next_free ../../gcc/fortran/parse.c:1279 0x6ae76a next_statement ../../gcc/fortran/parse.c:1511 0x6afdbb parse_spec ../../gcc/fortran/parse.c:3922 0x6b3d8e parse_module ../../gcc/fortran/parse.c:6115 0x6b40d7 gfc_parse_file() ../../gcc/fortran/parse.c:6428 0x70036f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95614] New: ICE in build_field, at fortran/trans-common.c:301
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95614 Bug ID: 95614 Summary: ICE in build_field, at fortran/trans-common.c:301 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- A name clash affects versions down to at least r5 : $ cat z1.f90 module m common m end $ cat z2.f90 module m common /xc/ m end $ cat z0.f90 module m integer m end $ gfortran-11-20200607 -c z0.f90 z0.f90:2:9: 2 | integer m | 1 Error: Symbol 'm' at (1) cannot have a type $ gfortran-11-20200607 -c z1.f90 f951: internal compiler error: Segmentation fault 0xd5a35f crash_signal ../../gcc/toplev.c:328 0x9c8ecb contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/tree.h:3409 0x9c8ecb size_binop_loc(unsigned int, tree_code, tree_node*, tree_node*) ../../gcc/fold-const.c:1906 0x763a2a build_field ../../gcc/fortran/trans-common.c:301 0x763a2a create_common ../../gcc/fortran/trans-common.c:646 0x765cce translate_common ../../gcc/fortran/trans-common.c:1265 0x765e86 gfc_trans_common(gfc_namespace*) ../../gcc/fortran/trans-common.c:1356 0x778c27 gfc_generate_module_vars(gfc_namespace*) ../../gcc/fortran/trans-decl.c:5796 0x746891 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2238 0x6f1141 translate_all_program_units ../../gcc/fortran/parse.c:6293 0x6f1141 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x73daef gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95613] New: ICE in main_block_label, at tree-cfg.c:1455
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95613 Bug ID: 95613 Summary: ICE in main_block_label, at tree-cfg.c:1455 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.f90 program p select case (0) 2 end select goto 2 end $ cat z2.f90 program p select case (0) 2 end select stop goto 2 end $ cat z3.f90 program p select case (0) case (2:1) 2stop end select goto 2 end $ cat z4.f90 program p select case (0) case (2:1) 2 stop case (3) goto 2 end select end $ gfortran-11-20200607 -c z1.f90 z1.f90:3:2: 3 | 2 end select | 1 4 |goto 2 | 2 Warning: Legacy Extension: Label at (1) is not in the same block as the GOTO statement at (2) during GIMPLE pass: cfg z1.f90:1:0: 1 | program p | internal compiler error: Segmentation fault 0xbc593f crash_signal ../../gcc/toplev.c:328 0xbf6d3b main_block_label ../../gcc/tree-cfg.c:1455 0xbf7271 cleanup_dead_labels() ../../gcc/tree-cfg.c:1639 0xc0186b build_gimple_cfg ../../gcc/tree-cfg.c:238 0xc0186b execute_build_cfg ../../gcc/tree-cfg.c:369 0xc0186b execute ../../gcc/tree-cfg.c:405
[Bug fortran/95612] New: [9/10/11 Regression] ICE in gfc_check_pointer_assign, at fortran/expr.c:4274
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95612 Bug ID: 95612 Summary: [9/10/11 Regression] ICE in gfc_check_pointer_assign, at fortran/expr.c:4274 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to r7, gives expected error with r6 : $ cat z1.f90 program p integer, pointer :: z(:) => shape(1) end $ cat z2.f90 program p integer, pointer :: z(:) => shape([1]) end $ gfortran-6 -c z1.f90 z1.f90:2:36: integer, pointer :: z(:) => shape(1) 1 Error: Pointer assignment target is neither TARGET nor POINTER at (1) $ gfortran-11-20200607 -c z1.f90 f951: internal compiler error: in gfc_check_pointer_assign, at fortran/expr.c:4274 0x65f27d gfc_check_pointer_assign(gfc_expr*, gfc_expr*, bool, bool) ../../gcc/fortran/expr.c:4274 0x65f48d gfc_check_assign_symbol(gfc_symbol*, gfc_component*, gfc_expr*) ../../gcc/fortran/expr.c:4438 0x63e1fe add_init_expr_to_sym ../../gcc/fortran/decl.c:1926 0x64817a variable_decl ../../gcc/fortran/decl.c:2990 0x64817a gfc_match_data_decl() ../../gcc/fortran/decl.c:6195 0x6ab513 match_word ../../gcc/fortran/parse.c:65 0x6ab513 decode_statement ../../gcc/fortran/parse.c:376 0x6acf5a next_free ../../gcc/fortran/parse.c:1279 0x6acf5a next_statement ../../gcc/fortran/parse.c:1511 0x6af304 parse_spec ../../gcc/fortran/parse.c:3738 0x6b137c parse_progunit ../../gcc/fortran/parse.c:5851 0x6b2a59 gfc_parse_file() ../../gcc/fortran/parse.c:6392 0x6feb3f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95611] New: ICE in access_attr_decl, at fortran/decl.c:9075
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95611 Bug ID: 95611 Summary: ICE in access_attr_decl, at fortran/decl.c:9075 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5, with a doubled statement : $ cat z1.f90 module m public operator (.a.) public operator (.a.) end $ gfortran-11-20200607 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbc593f crash_signal ../../gcc/toplev.c:328 0x63c87b access_attr_decl ../../gcc/fortran/decl.c:9075 0x6acbca decode_statement ../../gcc/fortran/parse.c:544 0x6acf5a next_free ../../gcc/fortran/parse.c:1279 0x6acf5a next_statement ../../gcc/fortran/parse.c:1511 0x6ae5ab parse_spec ../../gcc/fortran/parse.c:3922 0x6b257e parse_module ../../gcc/fortran/parse.c:6115 0x6b28c7 gfc_parse_file() ../../gcc/fortran/parse.c:6428 0x6feb3f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/84245] [8/9/10/11 Regression] ICE in delete_root, at fortran/bbt.c:150
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84245 --- Comment #5 from G. Steinmetz --- A few more disrupted cases : $ cat z03.f90 select type (n%& $ cat z04.f90 select type (n%m& $ cat z05.f90 select type (n( $ cat z06.f90 select type (n(& $ cat z07.f90 select type (n(m $ cat z08.f90 select type (n(m& $ cat z09.f90 select type (n(: $ cat z10.f90 select type (n[& $ cat z11.f90 select type (n[1] $ cat z12.f90 select type (n[m $ cat z14.f90 select type ((n $ cat z15.f90 select type ([n $ cat z16.f90 select type (n== $ gfortran-11-20200607 -c z05.f90 f951: internal compiler error: Segmentation fault 0xbc593f crash_signal ../../gcc/toplev.c:328 0x6ef109 gfc_find_symtree(gfc_symtree*, char const*) ../../gcc/fortran/symbol.c:2976 0x6ef171 gfc_delete_symtree(gfc_symtree**, char const*) ../../gcc/fortran/symbol.c:2957 0x6f0876 gfc_restore_last_undo_checkpoint() ../../gcc/fortran/symbol.c:3698 0x6a8157 reject_statement ../../gcc/fortran/parse.c:2633 0x6ab744 match_word ../../gcc/fortran/parse.c:70 0x6ab744 decode_statement ../../gcc/fortran/parse.c:428 0x6acf5a next_free ../../gcc/fortran/parse.c:1279 0x6acf5a next_statement ../../gcc/fortran/parse.c:1511 0x6b2708 gfc_parse_file() ../../gcc/fortran/parse.c:6375 0x6feb3f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95587] New: ICE in gfc_target_encode_expr, at fortran/target-memory.c:362
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95587 Bug ID: 95587 Summary: ICE in gfc_target_encode_expr, at fortran/target-memory.c:362 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.f90 program p class(*), allocatable :: x, y equivalence (x, y) end $ cat z2.f90 program p type t end type class(t), allocatable :: x, y equivalence (x, y) end $ cat z0.f90 # ok, allocatable object or pointer not allowed program p type t end type type(t), allocatable :: x, y equivalence (x, y) end $ gfortran-11-20200607 -c z1.f90 f951: internal compiler error: Invalid expression in gfc_target_encode_expr. 0x654af9 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x65621a gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1402 0x6f3200 gfc_target_encode_expr(gfc_expr*, unsigned char*, unsigned long) ../../gcc/fortran/target-memory.c:362 0x6f32ff expr_to_char ../../gcc/fortran/target-memory.c:697 0x6f3dd0 gfc_merge_initializers(gfc_typespec, gfc_expr*, locus*, unsigned char*, unsigned char*, unsigned long) ../../gcc/fortran/target-memory.c:735 0x71cc63 get_init_field ../../gcc/fortran/trans-common.c:544 0x71cc63 create_common ../../gcc/fortran/trans-common.c:633 0x71e111 finish_equivalences ../../gcc/fortran/trans-common.c:1326 0x71e111 gfc_trans_common(gfc_namespace*) ../../gcc/fortran/trans-common.c:1363 0x72b60f gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6764 0x6b3126 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6b3126 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6feb3f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95586] New: ICE in gfc_validate_kind, at fortran/trans-types.c:773
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95586 Bug ID: 95586 Summary: ICE in gfc_validate_kind, at fortran/trans-types.c:773 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.f90 program p implicit type(t) (1) type t end type end $ cat z2.f90 program p integer n1 parameter (n1 = 1) implicit type(t) (n1) type t end type end $ gfortran-11-20200607 -c z1.f90 f951: internal compiler error: gfc_validate_kind(): Got bad type 0x654af9 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x65621a gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1402 0x77d9a7 gfc_validate_kind(bt, int, bool) ../../gcc/fortran/trans-types.c:773 0x63f621 gfc_match_kind_spec(gfc_typespec*, bool) ../../gcc/fortran/decl.c:3191 0x646967 gfc_match_implicit() ../../gcc/fortran/decl.c:4832 0x6a8191 match_word ../../gcc/fortran/parse.c:65 0x6ac309 decode_statement ../../gcc/fortran/parse.c:508 0x6acf5a next_free ../../gcc/fortran/parse.c:1279 0x6acf5a next_statement ../../gcc/fortran/parse.c:1511 0x6af304 parse_spec ../../gcc/fortran/parse.c:3738 0x6b137c parse_progunit ../../gcc/fortran/parse.c:5851 0x6b2a59 gfc_parse_file() ../../gcc/fortran/parse.c:6392 0x6feb3f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95585] New: ICE in gfc_check_reshape, at fortran/check.c:4751
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95585 Bug ID: 95585 Summary: ICE in gfc_check_reshape, at fortran/check.c:4751 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.f90 program p integer, parameter :: a(2) = reshape([1, 2], a) end $ gfortran-11-20200607 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbc593f crash_signal ../../gcc/toplev.c:328 0x62e589 gfc_check_reshape(gfc_expr*, gfc_expr*, gfc_expr*, gfc_expr*) ../../gcc/fortran/check.c:4751 0x66a55c do_check ../../gcc/fortran/intrinsic.c:4737 0x66a55c check_specific ../../gcc/fortran/intrinsic.c:4750 0x674854 gfc_intrinsic_func_interface(gfc_expr*, int) ../../gcc/fortran/intrinsic.c:4987 0x6c2733 resolve_unknown_f ../../gcc/fortran/resolve.c:2902 0x6c2733 resolve_function ../../gcc/fortran/resolve.c:3246 0x6c2733 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7040 0x65a154 gfc_reduce_init_expr(gfc_expr*) ../../gcc/fortran/expr.c:3085 0x65d3e0 gfc_match_init_expr(gfc_expr**) ../../gcc/fortran/expr.c:3133 0x648c84 variable_decl ../../gcc/fortran/decl.c:2886 0x648c84 gfc_match_data_decl() ../../gcc/fortran/decl.c:6195 0x6ab513 match_word ../../gcc/fortran/parse.c:65 0x6ab513 decode_statement ../../gcc/fortran/parse.c:376 0x6acf5a next_free ../../gcc/fortran/parse.c:1279 0x6acf5a next_statement ../../gcc/fortran/parse.c:1511 0x6af304 parse_spec ../../gcc/fortran/parse.c:3738 0x6b137c parse_progunit ../../gcc/fortran/parse.c:5851 0x6b2a59 gfc_parse_file() ../../gcc/fortran/parse.c:6392 0x6feb3f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95584] New: ICE in generic_correspondence, at fortran/interface.c:1260
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95584 Bug ID: 95584 Summary: ICE in generic_correspondence, at fortran/interface.c:1260 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5, with a doubled interface : $ cat z1.f90 program p interface s subroutine g(x, *) end subroutine h(y, *) end end interface end $ gfortran-11-20200607 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbc593f crash_signal ../../gcc/toplev.c:328 0x662887 generic_correspondence ../../gcc/fortran/interface.c:1260 0x66379b gfc_compare_interfaces(gfc_symbol*, gfc_symbol*, char const*, int, int, char*, int, char const*, char const*, bool*) ../../gcc/fortran/interface.c:1776 0x663f6c check_interface1 ../../gcc/fortran/interface.c:1954 0x664163 check_sym_interfaces ../../gcc/fortran/interface.c:2012 0x6e9fc2 do_traverse_symtree ../../gcc/fortran/symbol.c:4150 0x6641e0 gfc_check_interfaces(gfc_namespace*) ../../gcc/fortran/interface.c:2104 0x6cf3ad resolve_types ../../gcc/fortran/resolve.c:17191 0x6ca98c gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17290 0x6b2adc resolve_all_program_units ../../gcc/fortran/parse.c:6245 0x6b2adc gfc_parse_file() ../../gcc/fortran/parse.c:6492 0x6feb3f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212
[Bug fortran/95544] ICE in gfc_can_put_var_on_stack, at fortran/trans-decl.c:494
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95544 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-invalid-code --- Comment #1 from G. Steinmetz --- Related : $ cat za1.f90 program p character(:), allocatable :: z print *, len(null(z)) print *, len_trim(null(z)) end $ cat za2.f90 program p character(:), pointer :: z print *, len(null(z)) print *, len_trim(null(z)) end $ cat zz1.f90 program p character(:), allocatable :: z z = trim(null(z)) end
[Bug fortran/95544] New: ICE in gfc_can_put_var_on_stack, at fortran/trans-decl.c:494
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95544 Bug ID: 95544 Summary: ICE in gfc_can_put_var_on_stack, at fortran/trans-decl.c:494 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.f90 program p character(:), allocatable :: z print *, adjustl(null(z)) print *, adjustr(null(z)) end $ cat z2.f90 program p character(:), pointer :: z print *, adjustl(null(z)) print *, adjustr(null(z)) end $ gfortran-11-20200531 -c z1.f90 z1.f90:3:0: 3 |print *, adjustl(null(z)) | internal compiler error: Segmentation fault 0xbc37bf crash_signal ../../gcc/toplev.c:328 0x72 gfc_can_put_var_on_stack(tree_node*) ../../gcc/fortran/trans-decl.c:494 0x72edb8 gfc_conv_string_tmp(gfc_se*, tree_node*, tree_node*) ../../gcc/fortran/trans-expr.c:3378 0x745c66 gfc_conv_intrinsic_adjust ../../gcc/fortran/trans-intrinsic.c:8201 0x75ab1b gfc_conv_intrinsic_function(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-intrinsic.c:10038 0x73205a gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8682 0x738ef2 gfc_conv_expr_reference(gfc_se*, gfc_expr*, bool) ../../gcc/fortran/trans-expr.c:8782 0x761687 gfc_trans_transfer(gfc_code*) ../../gcc/fortran/trans-io.c:2582 0x7017f7 trans_code ../../gcc/fortran/trans.c:2084 0x75f16e build_dt ../../gcc/fortran/trans-io.c:2026 0x7017d7 trans_code ../../gcc/fortran/trans.c:2056 0x72ad24 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6840 0x6b25e6 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6b25e6 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6fdfff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95543] New: ICE in is_CFI_desc, at fortran/expr.c:1080
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95543 Bug ID: 95543 Summary: ICE in is_CFI_desc, at fortran/expr.c:1080 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- This started with r8, before 20180525 : $ cat z1.f90 program p type t(a, b) integer, kind :: a = 4 integer, kind :: b = a + 4 end type type(t()) :: z print *, z end $ cat z2.f90 program p type t(a, b) integer, kind :: a = 1 integer, kind :: b = a end type type(t) :: z print *, z end $ cat z3v.f90 program p type t(a, b) integer, kind :: a = 1 integer, kind :: b = a end type type(t(4)) :: z print *, z end $ cat z4v.f90 program p type t(a, b) integer, kind :: a = 4 integer, kind :: b = a + 4 end type type(t(b=6)) :: z print *, z end $ gfortran-11-20200531 -c z1.f90 z1.f90:8:0: 8 | end | internal compiler error: Segmentation fault 0xbc37bf crash_signal ../../gcc/toplev.c:328 0x65843b is_CFI_desc(gfc_symbol*, gfc_expr*) ../../gcc/fortran/expr.c:1080 0x7268d8 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1555 0x735e68 gfc_conv_variable ../../gcc/fortran/trans-expr.c:2734 0x73207a gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8690 0x7321d2 gfc_conv_expr_op ../../gcc/fortran/trans-expr.c:3626 0x7321d2 gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8678 0x734ed3 gfc_conv_expr_val(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8735 0x735020 gfc_conv_expr_type(gfc_se*, gfc_expr*, tree_node*) ../../gcc/fortran/trans-expr.c:8749 0x7167c3 structure_alloc_comps ../../gcc/fortran/trans-array.c:9491 0x719a66 gfc_allocate_pdt_comp(gfc_symbol*, tree_node*, int, gfc_actual_arglist*) ../../gcc/fortran/trans-array.c:9879 0x728a30 gfc_trans_deferred_vars(gfc_symbol*, gfc_wrapped_block*) ../../gcc/fortran/trans-decl.c:4670 0x72ae08 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6945 0x6b25e6 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6b25e6 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6fdfff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95542] ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1649
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95542 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-valid-code --- Comment #1 from G. Steinmetz --- More variants : $ cat zz1.f90 function f() character(:), allocatable :: f f = 'abc' call s contains subroutine s print *, f end end $ cat zz2.f90 function f() character(:), pointer :: f f = 'abc' call s contains subroutine s print *, f end end And a working one without an inner s : $ cat za1.f90 function f() character(:), allocatable :: f f = 'abc' end program p interface function f() character(:), allocatable :: f end end interface print *, f() end $ gfortran-11-20200531 za1.f90 && ./a.out abc $
[Bug fortran/95542] New: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1649
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95542 Bug ID: 95542 Summary: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1649 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.f90 function f() character(:), allocatable :: f call s contains subroutine s f = 'abc' end end $ cat z2.f90 function f() character(:), pointer :: f call s contains subroutine s f = 'abc' end end $ gfortran-11-20200531 -c z1.f90 z1.f90:6:0: 6 | f = 'abc' | internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1649 0x72770b gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1646 0x735e68 gfc_conv_variable ../../gcc/fortran/trans-expr.c:2734 0x73207a gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8690 0x741abf gfc_trans_assignment_1 ../../gcc/fortran/trans-expr.c:10920 0x701537 trans_code ../../gcc/fortran/trans.c:1864 0x72ad24 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6840 0x72ab24 gfc_generate_contained_functions ../../gcc/fortran/trans-decl.c:5835 0x72ab24 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6772 0x6b25e6 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6b25e6 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6fdfff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95541] New: ICE in gfc_get_dataptr_offset, at fortran/trans-array.c:6909
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95541 Bug ID: 95541 Summary: ICE in gfc_get_dataptr_offset, at fortran/trans-array.c:6909 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started with r8, before 20180525 : $ cat z1.f90 program p type t(n) integer, len :: n integer :: a(n) end type type(t(3)) :: x(2) x(1)%a = [1, 2, 3] x(2)%a = [4, 5, 6] associate (y => x(:)%a(3)) print *, y end associate associate (y => x%a(3)) print *, y end associate end $ gfortran-11-20200531 -c z1.f90 z1.f90:10:0: 10 | print *, y | internal compiler error: in gfc_get_dataptr_offset, at fortran/trans-array.c:6909 0x70f33a gfc_get_dataptr_offset(stmtblock_t*, tree_node*, tree_node*, tree_node*, bool, gfc_expr*) ../../gcc/fortran/trans-array.c:6908 0x7141e1 gfc_conv_expr_descriptor(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-array.c:7766 0x76edb2 trans_associate_var ../../gcc/fortran/trans-stmt.c:1890 0x775a71 gfc_trans_block_construct(gfc_code*) ../../gcc/fortran/trans-stmt.c:2283 0x7016d7 trans_code ../../gcc/fortran/trans.c:1960 0x72ad24 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6840 0x6b25e6 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6b25e6 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6fdfff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95541] ICE in gfc_get_dataptr_offset, at fortran/trans-array.c:6909
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95541 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-valid-code --- Comment #1 from G. Steinmetz --- This variant works : $ cat z2.f90 program p type t(n) integer, len :: n integer :: a(n) end type type(t(3)) :: x(2) x(1)%a = [1, 2, 3] x(2)%a = [4, 5, 6] associate (y => x(2)%a(3)) print *, y end associate associate (y => x(2)%a) print *, y end associate end $ gfortran-11-20200531 z2.f90 && ./a.out 6 4 5 6 $
[Bug fortran/95504] ICE in transfer_array_component, at fortran/trans-io.c:2167
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95504 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-invalid-code --- Comment #1 from G. Steinmetz --- With a non-parameterized type instead : $ cat zz1.f90 program p type t integer :: n integer, pointer :: a(:) end type type(t) :: z print *, z end $ gfortran-11-20200531 -c zz1.f90 zz1.f90:7:13: 7 |print *, z | 1 Error: Data transfer element at (1) cannot have POINTER components unless it is processed by a defined input/output procedure
[Bug fortran/95504] New: ICE in transfer_array_component, at fortran/trans-io.c:2167
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95504 Bug ID: 95504 Summary: ICE in transfer_array_component, at fortran/trans-io.c:2167 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started with r8 before 20180525 : $ cat z1.f90 program p type t(n) integer, len :: n integer, pointer :: a(:) end type type(t(3)) :: z print *, z end $ cat z2.f90 program p type t(n) integer, len :: n integer, allocatable :: a(:) end type type(t(3)) :: z print *, z end $ gfortran-11-20200531 -c z1.f90 z1.f90:7:0: 7 |print *, z | internal compiler error: Segmentation fault 0xbc37bf crash_signal ../../gcc/toplev.c:328 0x75e576 transfer_array_component ../../gcc/fortran/trans-io.c:2167 0x75de47 transfer_expr ../../gcc/fortran/trans-io.c:2471 0x7616a0 gfc_trans_transfer(gfc_code*) ../../gcc/fortran/trans-io.c:2661 0x7017f7 trans_code ../../gcc/fortran/trans.c:2084 0x75f16e build_dt ../../gcc/fortran/trans-io.c:2026 0x7017d7 trans_code ../../gcc/fortran/trans.c:2056 0x72ad24 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6840 0x6b25e6 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6b25e6 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6fdfff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95503] New: ICE in gfc_is_simply_contiguous, at fortran/expr.c:5844
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95503 Bug ID: 95503 Summary: ICE in gfc_is_simply_contiguous, at fortran/expr.c:5844 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20181028 (error) and 20181104 (ICE) : $ cat z1.f90 program p complex, target :: a = (1.0, 2.0) real, pointer, contiguous :: b => a%re end $ cat z2.f90 program p complex, target :: a real, pointer, contiguous :: b => a%re end $ gfortran-11-20200531 -c z1.f90 f951: internal compiler error: in gfc_is_simply_contiguous, at fortran/expr.c:5844 0x65d5a2 gfc_is_simply_contiguous(gfc_expr*, bool, bool) ../../gcc/fortran/expr.c:5844 0x65e5f7 gfc_check_pointer_assign(gfc_expr*, gfc_expr*, bool, bool) ../../gcc/fortran/expr.c:4349 0x65e93d gfc_check_assign_symbol(gfc_symbol*, gfc_component*, gfc_expr*) ../../gcc/fortran/expr.c:4438 0x63d70e add_init_expr_to_sym ../../gcc/fortran/decl.c:1926 0x64762a variable_decl ../../gcc/fortran/decl.c:2990 0x64762a gfc_match_data_decl() ../../gcc/fortran/decl.c:6190 0x6aa9d3 match_word ../../gcc/fortran/parse.c:65 0x6aa9d3 decode_statement ../../gcc/fortran/parse.c:376 0x6ac41a next_free ../../gcc/fortran/parse.c:1279 0x6ac41a next_statement ../../gcc/fortran/parse.c:1511 0x6ada6b parse_spec ../../gcc/fortran/parse.c:3922 0x6b083c parse_progunit ../../gcc/fortran/parse.c:5851 0x6b1f19 gfc_parse_file() ../../gcc/fortran/parse.c:6392 0x6fdfff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95502] New: ICE in gfc_check_do_variable, at fortran/parse.c:4446
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95502 Bug ID: 95502 Summary: ICE in gfc_check_do_variable, at fortran/parse.c:4446 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20181028 (error) and 20181104 (ICE) : $ cat z1.f90 program p integer, pointer :: z nullify(z%kind) end $ cat z2.f90 program p complex, pointer :: z nullify(z%kind) ! nullify(z%re) ! nullify(z%im) end $ cat z3.f90 program p character, pointer :: z nullify(z%len) nullify(z%kind) end $ gfortran-11-20200531 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbc37bf crash_signal ../../gcc/toplev.c:328 0x6aeed8 gfc_check_do_variable(gfc_symtree*) ../../gcc/fortran/parse.c:4446 0x6895ab gfc_match_nullify() ../../gcc/fortran/match.c:4625 0x6a7651 match_word ../../gcc/fortran/parse.c:65 0x6ab35d decode_statement ../../gcc/fortran/parse.c:527 0x6ac41a next_free ../../gcc/fortran/parse.c:1279 0x6ac41a next_statement ../../gcc/fortran/parse.c:1511 0x6ada6b parse_spec ../../gcc/fortran/parse.c:3922 0x6b083c parse_progunit ../../gcc/fortran/parse.c:5851 0x6b1f19 gfc_parse_file() ../../gcc/fortran/parse.c:6392 0x6fdfff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95501] New: ICE in gfc_match_pointer_assignment, at fortran/match.c:1422
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95501 Bug ID: 95501 Summary: ICE in gfc_match_pointer_assignment, at fortran/match.c:1422 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20181028 (error) and 20181104 (ICE) : $ cat z1.f90 program p integer, target :: a = 2 integer, pointer :: z z%kind => a%kind z%kind => a end $ cat z2.f90 program p character, target :: a = 'a' character, pointer :: z z%kind => a z%kind => a%kind z%len => a z%len => a%len a%kind => a%len a%len => a%kind end $ gfortran-11-20200531 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbc37bf crash_signal ../../gcc/toplev.c:328 0x686c67 gfc_match_pointer_assignment() ../../gcc/fortran/match.c:1422 0x6aa97b match_word ../../gcc/fortran/parse.c:65 0x6aa97b decode_statement ../../gcc/fortran/parse.c:362 0x6ac41a next_free ../../gcc/fortran/parse.c:1279 0x6ac41a next_statement ../../gcc/fortran/parse.c:1511 0x6ada6b parse_spec ../../gcc/fortran/parse.c:3922 0x6b083c parse_progunit ../../gcc/fortran/parse.c:5851 0x6b1f19 gfc_parse_file() ../../gcc/fortran/parse.c:6392 0x6fdfff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/82314] internal compiler error: in gfc_conv_expr_descriptor, at fortran/trans-array.c:6972
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82314 G. Steinmetz changed: What|Removed |Added CC||gs...@t-online.de --- Comment #5 from G. Steinmetz --- Also related : $ cat z1.f90 program p integer, parameter :: a(merge(2,3,.true.)) = 1, b = size(a) print *, rank(b) end $ cat z2.f90 program p integer, parameter :: a(merge(2,3,.true.)) = 1 integer, parameter :: b = size(a) print *, rank(b) end $ gfortran-11-20200531 -c z2.f90 f951: internal compiler error: Segmentation fault 0xbc37bf crash_signal ../../gcc/toplev.c:328 0x62d62b gfc_check_rank(gfc_expr*) ../../gcc/fortran/check.c:4577 0x669a0c do_check ../../gcc/fortran/intrinsic.c:4737 0x669a0c check_specific ../../gcc/fortran/intrinsic.c:4750 0x673d04 gfc_intrinsic_func_interface(gfc_expr*, int) ../../gcc/fortran/intrinsic.c:4987 0x6c1bf3 resolve_unknown_f ../../gcc/fortran/resolve.c:2902 0x6c1bf3 resolve_function ../../gcc/fortran/resolve.c:3246 0x6c1bf3 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7040 0x6c872c gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7007 0x6c872c gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11742 0x6d186f gfc_resolve_blocks(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:10769 0x6c7508 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11732 0x6c9d97 resolve_codes ../../gcc/fortran/resolve.c:17257 0x6c9e5e gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17292 0x6b1f9c resolve_all_program_units ../../gcc/fortran/parse.c:6245 0x6b1f9c gfc_parse_file() ../../gcc/fortran/parse.c:6492 0x6fdfff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/93814] [9/10/11 Regression] ICE in build_entry_thunks, at fortran/trans-decl.c:2898
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93814 --- Comment #6 from G. Steinmetz --- Following (valid) cases should also be considered (no ICE) : $ cat z2.f90 function f() character :: f, g entry g() end $ cat z3.f90 function f() bind(c) integer :: f, g entry g() bind(c) end $ cat z4.f90 function f() bind(c) real :: f, g entry g() bind(c) end
[Bug fortran/95375] New: ICE in add_use_op, Error: mismatching comparison operand types
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95375 Bug ID: 95375 Summary: ICE in add_use_op, Error: mismatching comparison operand types Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- An inconsistent interface hits versions down to at least r5 : (detected without bind(c)) $ cat z1.f90 function f() result(n) bind(c) class(*), allocatable :: n end program p interface function f() result(n) bind(c) integer :: n end end interface if ( f() /= 0 ) stop end $ gfortran-11-20200524 -c z1.f90 during GIMPLE pass: ssa z1.f90:11:0: 11 | end | internal compiler error: Segmentation fault 0xbc0f6f crash_signal ../../gcc/toplev.c:328 0xd0a3e0 add_use_op ../../gcc/tree-ssa-operands.c:377 0xd0a3e0 operands_scanner::finalize_ssa_uses() ../../gcc/tree-ssa-operands.c:480 0xd0a3e0 operands_scanner::finalize_ssa_stmt_operands() ../../gcc/tree-ssa-operands.c:506 0xd0a3e0 operands_scanner::build_ssa_operands() ../../gcc/tree-ssa-operands.c:1014 0xd0aa10 update_stmt_operands(function*, gimple*) ../../gcc/tree-ssa-operands.c:1155 0xc3a754 update_stmt ../../gcc/gimple-ssa.h:175 0xc3a754 mark_def_sites ../../gcc/tree-into-ssa.c:649 0xc3a754 mark_def_dom_walker::before_dom_children(basic_block_def*) ../../gcc/tree-into-ssa.c:2342 0x13a3e44 dom_walker::walk(basic_block_def*) ../../gcc/domwalk.c:309 0xc3cd85 execute ../../gcc/tree-into-ssa.c:2459 Configured with --enable-checking=yes : $ gfortran-11-20200524 -c z1.f90 z1.f90:4:0: 4 | program p | Error: mismatching comparison operand types struct __class__STAR_a integer(kind=4) if (D.3926 != 0) goto ; else goto ; z1.f90:4:0: internal compiler error: 'verify_gimple' failed 0xd9b27d verify_gimple_in_seq(gimple*) ../../gcc/tree-cfg.c:5113 0xa526b1 gimplify_body(tree_node*, bool) ../../gcc/gimplify.c:14919 0xa52967 gimplify_function_tree(tree_node*) ../../gcc/gimplify.c:14990 0x88d9e7 cgraph_node::analyze() ../../gcc/cgraphunit.c:671 0x890e21 analyze_functions ../../gcc/cgraphunit.c:1231 0x892042 symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2975
[Bug fortran/95374] New: ICE: gfc_array_size failed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95374 Bug ID: 95374 Summary: ICE: gfc_array_size failed Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5, z2.f90 works : $ cat z1.f90 program p integer :: i integer, parameter :: a(0) = 0 integer, parameter :: b(*) = [(a(i:i), i=0,0)] end $ cat z2.f90 program p integer :: i integer, parameter :: a(0) = 0 integer, parameter :: b(0) = [(a(i:i), i=0,0)] end $ gfortran-11-20200524 -c z1.f90 f951: internal compiler error: gfc_array_size failed 0x6519b9 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x6530da gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1402 0x63b57d add_init_expr_to_sym ../../gcc/fortran/decl.c:2039 0x64503a variable_decl ../../gcc/fortran/decl.c:2990 0x64503a gfc_match_data_decl() ../../gcc/fortran/decl.c:6190 0x6a83d3 match_word ../../gcc/fortran/parse.c:65 0x6a83d3 decode_statement ../../gcc/fortran/parse.c:376 0x6a9e1a next_free ../../gcc/fortran/parse.c:1279 0x6a9e1a next_statement ../../gcc/fortran/parse.c:1511 0x6ab46b parse_spec ../../gcc/fortran/parse.c:3922 0x6ae23c parse_progunit ../../gcc/fortran/parse.c:5851 0x6af919 gfc_parse_file() ../../gcc/fortran/parse.c:6392 0x6fb9af gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95373] New: [9/10/11 Regression] ICE in build_reference_type, at tree.c:7942
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95373 Bug ID: 95373 Summary: [9/10/11 Regression] ICE in build_reference_type, at tree.c:7942 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20181028 (error) and 20181104 (ICE), with option -std=f95 : $ cat z1.f90 subroutine s(x) integer, parameter :: i = 3 real(i%kind) :: x end $ gfortran-11-20200524 -c z1.f90 $ gfortran-11-20200524 -c z1.f90 -std=f95 z1.f90:1:0: 1 | subroutine s(x) | internal compiler error: Segmentation fault 0xd548ff crash_signal ../../gcc/toplev.c:328 0x106d708 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) ../../gcc/tree.h:3418 0x106d708 build_reference_type(tree_node*) ../../gcc/tree.c:7942 0x7ea456 gfc_sym_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:2307 0x7ea993 gfc_get_function_type(gfc_symbol*, gfc_actual_arglist*) ../../gcc/fortran/trans-types.c:3059 0x7655a6 build_function_decl ../../gcc/fortran/trans-decl.c:2354 0x76be09 gfc_create_function_decl(gfc_namespace*, bool) ../../gcc/fortran/trans-decl.c:3048 0x776e3f gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6729 0x6ee246 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6ee246 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x73a76f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95372] New: ICE in find_array_section, at fortran/expr.c:1687
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95372 Bug ID: 95372 Summary: ICE in find_array_section, at fortran/expr.c:1687 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5, works without parameter : $ cat z1.f90 program p type t integer :: a = 1 end type type(t), parameter :: x(3) = t() type(t) :: y(1) y = [x(2:2)] print *, y end $ cat z2.f90 program p type t integer :: a = 1 end type type(t) :: x(3) = t() type(t) :: y(1) y = [x(2:2)] print *, y end $ gfortran-11-20200524 z2.f90 && ./a.out 1 $ $ gfortran-11-20200524 -c z1.f90 f951: internal compiler error: in find_array_section, at fortran/expr.c:1687 0x655de5 find_array_section ../../gcc/fortran/expr.c:1687 0x65735a simplify_const_ref ../../gcc/fortran/expr.c:1892 0x657ebe gfc_simplify_expr(gfc_expr*, int) ../../gcc/fortran/expr.c:2278 0x6580c3 simplify_parameter_variable ../../gcc/fortran/expr.c:2107 0x657e8d gfc_simplify_expr(gfc_expr*, int) ../../gcc/fortran/expr.c:2245 0x6208fd expand_constructor ../../gcc/fortran/array.c:1814 0x622c77 gfc_array_size(gfc_expr*, __mpz_struct (*) [1]) ../../gcc/fortran/array.c:2648 0x6bbfbf expression_shape ../../gcc/fortran/resolve.c:5390 0x6bbfbf gfc_expression_rank(gfc_expr*) ../../gcc/fortran/resolve.c:5464 0x6bd8bf gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7076 0x6c6144 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:11653 0x6c6144 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11746 0x6c7747 resolve_codes ../../gcc/fortran/resolve.c:17257 0x6c780e gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17292 0x6af99c resolve_all_program_units ../../gcc/fortran/parse.c:6245 0x6af99c gfc_parse_file() ../../gcc/fortran/parse.c:6492 0x6fb9af gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95342] [9/10/11 Regression] ICE in gfc_match_subroutine, at fortran/decl.c:7913
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95342 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-invalid-code --- Comment #1 from G. Steinmetz --- Related : $ cat z2.f90 module m interface module function f() end end interface interface function f() bind(c) end end interface end $ gfortran-11-20200524 -c z2.f90 f951: internal compiler error: Segmentation fault 0xbc0f6f crash_signal ../../gcc/toplev.c:328 0x643eeb gfc_match_function_decl() ../../gcc/fortran/decl.c:7398 0x6a82ca decode_statement ../../gcc/fortran/parse.c:343 0x6a9e1a next_free ../../gcc/fortran/parse.c:1279 0x6a9e1a next_statement ../../gcc/fortran/parse.c:1511 0x6aba5c parse_interface ../../gcc/fortran/parse.c:3519 0x6aba5c parse_spec ../../gcc/fortran/parse.c:3875 0x6af43e parse_module ../../gcc/fortran/parse.c:6115 0x6af787 gfc_parse_file() ../../gcc/fortran/parse.c:6428 0x6fb9af gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95342] New: [9/10/11 Regression] ICE in gfc_match_subroutine, at fortran/decl.c:7913
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95342 Bug ID: 95342 Summary: [9/10/11 Regression] ICE in gfc_match_subroutine, at fortran/decl.c:7913 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20191013 and 20191020, with a name conflict : $ cat z1.f90 module m interface module subroutine s() end subroutine s() bind(c) end end interface end $ gfortran-11-20200524 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbc0f6f crash_signal ../../gcc/toplev.c:328 0x644307 gfc_match_subroutine() ../../gcc/fortran/decl.c:7913 0x6a8427 decode_statement ../../gcc/fortran/parse.c:382 0x6a9e1a next_free ../../gcc/fortran/parse.c:1279 0x6a9e1a next_statement ../../gcc/fortran/parse.c:1511 0x6aba5c parse_interface ../../gcc/fortran/parse.c:3519 0x6aba5c parse_spec ../../gcc/fortran/parse.c:3875 0x6af43e parse_module ../../gcc/fortran/parse.c:6115 0x6af787 gfc_parse_file() ../../gcc/fortran/parse.c:6428 0x6fb9af gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95340] New: [10/11 Regression] ICE in gfc_match_select_rank, at fortran/match.c:6690
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95340 Bug ID: 95340 Summary: [10/11 Regression] ICE in gfc_match_select_rank, at fortran/match.c:6690 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- With a missing attribute allocatable or pointer; occurred between 20190825 (error) and 20190901 (ICE) : $ cat z1.f90 program p type t end type class(t) :: z select rank (z) end select end $ gfortran-11-20200524 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbc0f6f crash_signal ../../gcc/toplev.c:328 0x689bef gfc_match_select_rank() ../../gcc/fortran/match.c:6690 0x6a860e match_word ../../gcc/fortran/parse.c:65 0x6a860e decode_statement ../../gcc/fortran/parse.c:429 0x6a9e1a next_free ../../gcc/fortran/parse.c:1279 0x6a9e1a next_statement ../../gcc/fortran/parse.c:1511 0x6ab46b parse_spec ../../gcc/fortran/parse.c:3922 0x6ae23c parse_progunit ../../gcc/fortran/parse.c:5851 0x6af919 gfc_parse_file() ../../gcc/fortran/parse.c:6392 0x6fb9af gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95339] New: ICE in alloc_scalar_allocatable_for_subcomponent_assignment, at fortran/trans-expr.c:8002
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95339 Bug ID: 95339 Summary: ICE in alloc_scalar_allocatable_for_subcomponent_assignment, at fortran/trans-expr.c:8002 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least r5 : $ cat z1.f90 program p type t character(:), allocatable :: a end type type(t) :: x[*] data x /t(1)/ end $ gfortran-11-20200524 -c z1.f90 -fcoarray=single # accepted $ $ gfortran-11-20200524 -c z1.f90 -fcoarray=lib z1.f90:1:0: 1 | program p | internal compiler error: in alloc_scalar_allocatable_for_subcomponent_assignment, at fortran/trans-expr.c:8002 0x73618f alloc_scalar_allocatable_for_subcomponent_assignment ../../gcc/fortran/trans-expr.c:8002 0x73618f gfc_trans_subcomponent_assign ../../gcc/fortran/trans-expr.c:8190 0x7362bb gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool) ../../gcc/fortran/trans-expr.c:8467 0x72f860 gfc_conv_structure(gfc_se*, gfc_expr*, int) ../../gcc/fortran/trans-expr.c:8534 0x72fa9c gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8702 0x73f1aa gfc_trans_assignment_1 ../../gcc/fortran/trans-expr.c:10884 0x71cf48 generate_coarray_sym_init ../../gcc/fortran/trans-decl.c:5688 0x6e6e32 do_traverse_symtree ../../gcc/fortran/symbol.c:4150 0x71c385 generate_coarray_init ../../gcc/fortran/trans-decl.c:5738 0x728aa4 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6773 0x6affe6 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6affe6 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6fb9af gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95338] New: [9/10/11 Regression] ICE in eliminate_stmt, at tree-ssa-sccvn.c:5974
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95338 Bug ID: 95338 Summary: [9/10/11 Regression] ICE in eliminate_stmt, at tree-ssa-sccvn.c:5974 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20181202 and 20181209, with option -O1 : $ cat z1.f90 module m contains function f(x) integer :: x integer :: f real :: g f = x return entry g(x) g = x end end program p use m print *, f(1) print *, g(1) end $ gfortran-11-20200524 -c z1.f90 -O2 -ff2c $ $ gfortran-11-20200524 -c z1.f90 -O1 -ff2c during GIMPLE pass: fre z1.f90:6:0: 6 | real :: g | internal compiler error: in eliminate_stmt, at tree-ssa-sccvn.c:5974 0xd40f45 eliminate_dom_walker::eliminate_stmt(basic_block_def*, gimple_stmt_iterator*) ../../gcc/tree-ssa-sccvn.c:5974 0xd45a90 process_bb ../../gcc/tree-ssa-sccvn.c:7173 0xd46fe1 do_rpo_vn ../../gcc/tree-ssa-sccvn.c:7657 0xd47f8a execute ../../gcc/tree-ssa-sccvn.c:7811 Configured with --enable-checking=yes : $ gfortran-11-20200524 -c z1.f90 -O1 -ff2c z1.f90:6:0: 6 | real :: g | Error: non-trivial conversion in 'component_ref' real(kind=8) real(kind=4) D.3943 = __result.g; z1.f90:6:0: internal compiler error: 'verify_gimple' failed 0xd9b27d verify_gimple_in_seq(gimple*) ../../gcc/tree-cfg.c:5113 0xa526b1 gimplify_body(tree_node*, bool) ../../gcc/gimplify.c:14919 0xa52967 gimplify_function_tree(tree_node*) ../../gcc/gimplify.c:14990 0x88d9e7 cgraph_node::analyze() ../../gcc/cgraphunit.c:671 0x890e21 analyze_functions ../../gcc/cgraphunit.c:1231 0x892042 symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2975
[Bug fortran/93482] ICE in gfc_resolve_character_array_constructor, at fortran/array.c:2096
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93482 --- Comment #2 from G. Steinmetz --- Another test case : $ cat z3.f90 program p character(2), parameter :: a(3) = ['a1', 'b2', 'c3'] print *, [(a(2:1))] print *, size([(a(2:1))]) end Works without parameter attribute : $ cat z4.f90 program p character(2) :: a(3) = ['a1', 'b2', 'c3'] print *, [(a(2:1))] print *, size([(a(2:1))]) end $ gfortran-11-20200524 z4.f90 && ./a.out 0 $
[Bug c/95133] New: [9/10/11 Regression] ICE in gimple_redirect_edge_and_branch_force, at tree-cfg.c:6075
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95133 Bug ID: 95133 Summary: [9/10/11 Regression] ICE in gimple_redirect_edge_and_branch_force, at tree-cfg.c:6075 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started with r8, needs option -O3 : $ cat z1.c extern int a[16]; void f (int *ip, int x) { int *xp = a; for (int i=0; i<8; ++i) { base: if (x) return; } *xp++ = *ip; goto *(& + *ip); } $ gcc-11-20200510 -c z1.c -O2 $ gcc-11-20200510 -c z1.c -O3 during GIMPLE pass: split-paths z1.c: In function 'f': z1.c:2:6: internal compiler error: in gimple_redirect_edge_and_branch_force, at tree-cfg.c:6075 2 | void f (int *ip, int x) | ^ 0xd2de58 gimple_redirect_edge_and_branch_force ../../gcc/tree-cfg.c:6075 0x7d32a3 redirect_edge_and_branch_force(edge_def*, basic_block_def*) ../../gcc/cfghooks.c:490 0x7d509a duplicate_block(basic_block_def*, edge_def*, basic_block_def*, copy_bb_data*) ../../gcc/cfghooks.c:1109 0xcddf05 transform_duplicate(basic_block_def*, basic_block_def*) ../../gcc/tracer.c:245 0x1697ae0 split_paths ../../gcc/gimple-ssa-split-paths.c:463 0x1697ae0 execute_split_paths ../../gcc/gimple-ssa-split-paths.c:503 0x1697ae0 execute ../../gcc/gimple-ssa-split-paths.c:540
[Bug fortran/95107] ICE in hash_operand, at fold-const.c:3768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95107 G. Steinmetz changed: What|Removed |Added Summary|[10/11 Regression] ICE in |ICE in hash_operand, at |hash_operand, at|fold-const.c:3768 |fold-const.c:3768 | --- Comment #2 from G. Steinmetz --- > I see a Fortran FE ICE since at least 4.8.0: Can confirm that with test versions too.
[Bug c/95108] New: [10/11 Regression] ICE in tree_fits_uhwi_p, at tree.c:7292
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95108 Bug ID: 95108 Summary: [10/11 Regression] ICE in tree_fits_uhwi_p, at tree.c:7292 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20190811 and 20190818, with -fno-tree-ccp : (test case derived from pr88588.c) $ cat z1.c int *v; #pragma omp declare simd void foo (int x) { int *a = + 1; for (;;) { *v = *a; a = v; } } $ gcc-10-20190811 -c z1.c -O2 -fopenmp -fno-tree-ccp $ $ gcc-11-20200510 -c z1.c -O2 -fopenmp -fno-tree-ccp during GIMPLE pass: alias z1.c: In function 'foo.simdclone.0': z1.c:5:1: internal compiler error: Segmentation fault 5 | foo (int x) | ^~~ 0xb0ed8f crash_signal ../../gcc/toplev.c:328 0xd62e47 tree_fits_uhwi_p(tree_node const*) ../../gcc/tree.c:7292 0xcb74ad create_variable_info_for_1 ../../gcc/tree-ssa-structalias.c:6068 0xcb7c43 create_variable_info_for ../../gcc/tree-ssa-structalias.c:6251 0xcb7c43 get_vi_for_tree ../../gcc/tree-ssa-structalias.c:2939 0xcb839f get_constraint_for_ssa_var ../../gcc/tree-ssa-structalias.c:3031 0xcb8902 get_constraint_for_1 ../../gcc/tree-ssa-structalias.c:3611 0xcb97c4 get_constraint_for_ptr_offset ../../gcc/tree-ssa-structalias.c:3166 0xcb8939 get_constraint_for_1 ../../gcc/tree-ssa-structalias.c:3544 0xcb9172 get_constraint_for_address_of ../../gcc/tree-ssa-structalias.c:3462 0xcb8b6b get_constraint_for_1 ../../gcc/tree-ssa-structalias.c:3530 0xcbce95 find_func_aliases ../../gcc/tree-ssa-structalias.c:5017 0xcbdafe compute_points_to_sets ../../gcc/tree-ssa-structalias.c:7380 0xcbdafe compute_may_aliases() ../../gcc/tree-ssa-structalias.c:7861 0xa4524e execute_function_todo ../../gcc/passes.c:1957 0xa46192 execute_todo ../../gcc/passes.c:2039 A test version (configured with --enable-checking=yes) does not need that extra option : $ gcc-11-20200510-chk -c z1.c -O2 -fopenmp z1.c: In function 'foo.simdclone.7': z1.c:14:1: error: definition in block 6 follows the use 14 | } | ^ for SSA_NAME: _8 in statement: _9 = [(void *)_8 + 4B]; during IPA pass: simdclone z1.c:14:1: internal compiler error: verify_ssa failed 0xf3faab verify_ssa(bool, bool) ../../gcc/tree-ssa.c:1208 0xbe8827 execute_function_todo ../../gcc/passes.c:1992 0xbe952d do_per_function ../../gcc/passes.c:1647 0xbe9592 execute_todo ../../gcc/passes.c:2039
[Bug fortran/95107] New: [10/11 Regression] ICE in hash_operand, at fold-const.c:3768
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95107 Bug ID: 95107 Summary: [10/11 Regression] ICE in hash_operand, at fold-const.c:3768 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20191110 and 20191117, with -fno-automatic at -O2+ : $ cat z1.f90 program p type t real, pointer :: a => null() end type type t2 type(t) :: b(1) end type type(t2) :: x associate (y => x%b) end associate end $ gfortran-9 -c z1.f90 -fno-automatic -O2 $ $ gfortran-11-20200510 -c z1.f90 -fno-automatic -O2 during IPA pass: icf z1.f90:11:0: 11 | end | internal compiler error: in hash_operand, at fold-const.c:3768 0x8dfc2a operand_compare::hash_operand(tree_node const*, inchash::hash&, unsigned int) ../../gcc/fold-const.c:3768 0x8e038c operand_compare::hash_operand(tree_node const*, inchash::hash&, unsigned int) ../../gcc/fold-const.c:3858 0x8dffa2 operand_compare::hash_operand(tree_node const*, inchash::hash&, unsigned int) ../../gcc/fold-const.c:3685 0x142c58f ipa_icf::sem_variable::init(ipa_icf_gimple::func_checker*) ../../gcc/ipa-icf.c:1909 0x14340ce ipa_icf::sem_variable::parse(varpool_node*, bitmap_obstack*, ipa_icf_gimple::func_checker*) ../../gcc/ipa-icf.c:1889 0x143897d ipa_icf::sem_item_optimizer::parse_funcs_and_vars() ../../gcc/ipa-icf.c:2457 0xaf61ec execute_ipa_summary_passes(ipa_opt_pass_d*) ../../gcc/passes.c:2191 0x7fca29 ipa_passes ../../gcc/cgraphunit.c:2642 0x7fca29 symbol_table::compile() ../../gcc/cgraphunit.c:2752 0x7fe806 symbol_table::compile() ../../gcc/cgraphunit.c:3002 0x7fe806 symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2999
[Bug fortran/95106] New: Bogus warning from module with long name and an equivalence
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95106 Bug ID: 95106 Summary: Bogus warning from module with long name and an equivalence Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Name length 59 ok, suspicious warning for 60..63 : $ cat z1_59.f90 module m2345678901234567890123456789012345678901234567890123456789 real :: a(4), u(3,2) real :: b(4), v(4,2) equivalence (a(1),u(1,1)), (b(1),v(1,1)) end $ cat z1_60.f90 module m23456789012345678901234567890123456789012345678901234567890 real :: a(4), u(3,2) real :: b(4), v(4,2) equivalence (a(1),u(1,1)), (b(1),v(1,1)) end $ cat z1_63.f90 module m23456789012345678901234567890123456789012345678901234567890123 real :: a(4), u(3,2) real :: b(4), v(4,2) equivalence (a(1),u(1,1)), (b(1),v(1,1)) end $ gfortran-11-20200510 -c z1_59.f90 $ $ gfortran-11-20200510 -c z1_60.f90 z1_60.f90:1:67: 1 | module m23456789012345678901234567890123456789012345678901234567890 | 1 Warning: Named COMMON block 'm23456789012345678901234567890123456789012345678901234567890.eq.1' at (1) shall be of the same size as elsewhere (24 vs 32 bytes)
[Bug fortran/95091] New: ICE in gfc_hash_value, at fortran/class.c:538
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95091 Bug ID: 95091 Summary: ICE in gfc_hash_value, at fortran/class.c:538 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- A more complex example, switches between 44 (ok) and 45 (ICE) : (backtrace varies with release and name length) $ cat z1_44.f90 module m2345678901234567890123456789012345678901234 type t2345678901234567890123456789012345678901234 end type interface module subroutine s2345678901234567890123456789012345678901234 & (x2345678901234567890123456789012345678901234) end end interface end submodule(m2345678901234567890123456789012345678901234) & n2345678901234567890123456789012345678901234 type, extends(t2345678901234567890123456789012345678901234) :: & u2345678901234567890123456789012345678901234 end type end $ cat z1_45.f90 module m23456789012345678901234567890123456789012345 type t23456789012345678901234567890123456789012345 end type interface module subroutine s23456789012345678901234567890123456789012345 & (x23456789012345678901234567890123456789012345) end end interface end submodule(m23456789012345678901234567890123456789012345) & n23456789012345678901234567890123456789012345 type, extends(t23456789012345678901234567890123456789012345) :: & u23456789012345678901234567890123456789012345 end type end $ cat z1_63.f90 module m23456789012345678901234567890123456789012345678901234567890123 type t23456789012345678901234567890123456789012345678901234567890123 end type interface module subroutine s23456789012345678901234567890123456789012345678901234567890123 & (x23456789012345678901234567890123456789012345678901234567890123) end end interface end submodule(m23456789012345678901234567890123456789012345678901234567890123) & n23456789012345678901234567890123456789012345678901234567890123 type, extends(t23456789012345678901234567890123456789012345678901234567890123) :: & u23456789012345678901234567890123456789012345678901234567890123 end type end $ gfortran-11-20200510 -c z1_44.f90 $ $ gfortran-11-20200510 -c z1_45.f90 f951: internal compiler error: Segmentation fault 0xbb93cf crash_signal ../../gcc/toplev.c:328 0x64003a gfc_match_function_decl() ../../gcc/fortran/decl.c:7355 gfortran: internal compiler error: Segmentation fault signal terminated program f951 $ gfortran-11-20200510 -c z1_63.f90 f951: internal compiler error: Segmentation fault 0xbb93cf crash_signal ../../gcc/toplev.c:328 0x62c64c gfc_hash_value(gfc_symbol*) ../../gcc/fortran/class.c:538 gfortran: internal compiler error: Segmentation fault signal terminated program f951 Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions.
[Bug fortran/95090] New: ICE: identifier overflow: 129
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95090 Bug ID: 95090 Summary: ICE: identifier overflow: 129 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Switches between name length 54 (ok) and 55 (ICE) : $ cat z1_54.f90 module m23456789012345678901234567890123456789012345678901234 type t23456789012345678901234567890123456789012345678901234 & (n23456789012345678901234567890123456789012345678901234) integer, len :: n23456789012345678901234567890123456789012345678901234 = 8 end type integer :: a23456789012345678901234567890123456789012345678901234 integer :: b23456789012345678901234567890123456789012345678901234(3)[*] data b23456789012345678901234567890123456789012345678901234 /1,2,3/ contains subroutine s23456789012345678901234567890123456789012345678901234 type(t23456789012345678901234567890123456789012345678901234 & (n23456789012345678901234567890123456789012345678901234)) :: & z23456789012345678901234567890123456789012345678901234 end end $ cat z1_55.f90 module m234567890123456789012345678901234567890123456789012345 type t234567890123456789012345678901234567890123456789012345 & (n234567890123456789012345678901234567890123456789012345) integer, len :: n234567890123456789012345678901234567890123456789012345 = 8 end type integer :: a234567890123456789012345678901234567890123456789012345 integer :: b234567890123456789012345678901234567890123456789012345(3)[*] data b234567890123456789012345678901234567890123456789012345 /1,2,3/ contains subroutine s234567890123456789012345678901234567890123456789012345 type(t234567890123456789012345678901234567890123456789012345 & (n234567890123456789012345678901234567890123456789012345)) :: & z234567890123456789012345678901234567890123456789012345 end end $ cat z1_63.f90 module m23456789012345678901234567890123456789012345678901234567890123 type t23456789012345678901234567890123456789012345678901234567890123 & (n23456789012345678901234567890123456789012345678901234567890123) integer, len :: n23456789012345678901234567890123456789012345678901234567890123 = 8 end type integer :: a23456789012345678901234567890123456789012345678901234567890123 integer :: b23456789012345678901234567890123456789012345678901234567890123(3)[*] data b23456789012345678901234567890123456789012345678901234567890123 /1,2,3/ contains subroutine s23456789012345678901234567890123456789012345678901234567890123 type(t23456789012345678901234567890123456789012345678901234567890123 & (n23456789012345678901234567890123456789012345678901234567890123)) :: & z23456789012345678901234567890123456789012345678901234567890123 end end $ cat z1_63_clean.f90 module m23456789012345678901234567890123456789012345678901234567890123 type t23456789012345678901234567890123456789012345678901234567890123 & (n23456789012345678901234567890123456789012345678901234567890123) integer, len :: n23456789012345678901234567890123456789012345678901234567890123 = 8 end type integer :: a23456789012345678901234567890123456789012345678901234567890123 integer :: b23456789012345678901234567890123456789012345678901234567890123(3)[*] data b23456789012345678901234567890123456789012345678901234567890123 /1,2,3/ contains subroutine s23456789012345678901234567890123456789012345678901234567890123 type(t23456789012345678901234567890123456789012345678901234567890123 & (3)) :: & z23456789012345678901234567890123456789012345678901234567890123 end end $ gfortran-11-20200510 -c z1_54.f90 -fcoarray=lib $ gfortran-11-20200510 -c z1_55.f90 -fcoarray=single $ $ gfortran-11-20200510 -c z1_55.f90 -fcoarray=lib f951: internal compiler error: identifier overflow: 129 0x64db59 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x64f27a gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1402 0x676b1f gfc_get_string(char const*, ...) ../../gcc/fortran/iresolve.c:69 0x71bb8a gfc_build_qualified_array ../../gcc/fortran/trans-decl.c:994 0x720d24 gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1793 0x723b58 gfc_create_module_variable ../../gcc/fortran/trans-decl.c:5297 0x6e2f72 do_traverse_symtree ../../gcc/fortran/symbol.c:4147 0x72435b gfc_generate_module_vars(gfc_namespace*) ../../gcc/fortran/trans-decl.c:5796 0x6fed94 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2238 0x6abd11 translate_all_program_units ../../gcc/fortran/parse.c:6293 0x6abd11 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6f7a7f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95089] New: ICE in gfc_get_derived_type, at fortran/trans-types.c:2843
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95089 Bug ID: 95089 Summary: ICE in gfc_get_derived_type, at fortran/trans-types.c:2843 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Switches between 57 (ok) and 58 (ICE) : $ cat z1_57.f90 module m23456789012345678901234567890123456789012345678901234567 type t23456789012345678901234567890123456789012345678901234567 type(t23456789012345678901234567890123456789012345678901234567), & pointer :: z23456789012345678901234567890123456789012345678901234567 end type end $ cat z1_58.f90 module m234567890123456789012345678901234567890123456789012345678 type t234567890123456789012345678901234567890123456789012345678 type(t234567890123456789012345678901234567890123456789012345678), & pointer :: z234567890123456789012345678901234567890123456789012345678 end type end $ cat z1_63.f90 module m23456789012345678901234567890123456789012345678901234567890123 type t23456789012345678901234567890123456789012345678901234567890123 type(t23456789012345678901234567890123456789012345678901234567890123), & pointer :: z23456789012345678901234567890123456789012345678901234567890123 end type end $ gfortran-11-20200510 -c z1_57.f90 -fcoarray=lib $ gfortran-11-20200510 -c z1_58.f90 -fcoarray=single $ $ gfortran-11-20200510 -c z1_58.f90 -fcoarray=lib f951: internal compiler error: in gfc_get_derived_type, at fortran/trans-types.c:2843 0x77bbf6 gfc_get_derived_type(gfc_symbol*, int) ../../gcc/fortran/trans-types.c:2843 0x77bee8 gfc_typenode_for_spec(gfc_typespec*, int) ../../gcc/fortran/trans-types.c:1166 0x77c13e gfc_sym_type(gfc_symbol*) ../../gcc/fortran/trans-types.c:2247 0x7208fe gfc_get_symbol_decl(gfc_symbol*) ../../gcc/fortran/trans-decl.c:1767 0x723b58 gfc_create_module_variable ../../gcc/fortran/trans-decl.c:5297 0x6e2f72 do_traverse_symtree ../../gcc/fortran/symbol.c:4147 0x72435b gfc_generate_module_vars(gfc_namespace*) ../../gcc/fortran/trans-decl.c:5796 0x6fed94 gfc_generate_module_code(gfc_namespace*) ../../gcc/fortran/trans.c:2238 0x6abd11 translate_all_program_units ../../gcc/fortran/parse.c:6293 0x6abd11 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6f7a7f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95088] New: ICE in gfc_build_class_symbol, at fortran/class.c:653
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95088 Bug ID: 95088 Summary: ICE in gfc_build_class_symbol, at fortran/class.c:653 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- The search for internal restrictions of names has brought to light a few critical cases, in the following case the change occurs between 61 (ok) and 62 (ICE) : $ cat z1_61.f90 module m234567890123456789012345678901234567890123456789012345678901 type t234567890123456789012345678901234567890123456789012345678901 & (n234567890123456789012345678901234567890123456789012345678901) integer, kind :: n234567890123456789012345678901234567890123456789012345678901 end type type, extends (t234567890123456789012345678901234567890123456789012345678901) :: & a234567890123456789012345678901234567890123456789012345678901 end type interface module subroutine s234567890123456789012345678901234567890123456789012345678901 & (x234567890123456789012345678901234567890123456789012345678901) class(a234567890123456789012345678901234567890123456789012345678901(8)) :: & x234567890123456789012345678901234567890123456789012345678901 end end interface end $ cat z1_62.f90 module m2345678901234567890123456789012345678901234567890123456789012 type t2345678901234567890123456789012345678901234567890123456789012 & (n2345678901234567890123456789012345678901234567890123456789012) integer, kind :: n2345678901234567890123456789012345678901234567890123456789012 end type type, extends (t2345678901234567890123456789012345678901234567890123456789012) :: & a2345678901234567890123456789012345678901234567890123456789012 end type interface module subroutine s2345678901234567890123456789012345678901234567890123456789012 & (x2345678901234567890123456789012345678901234567890123456789012) class(a2345678901234567890123456789012345678901234567890123456789012(8)) :: & x2345678901234567890123456789012345678901234567890123456789012 end end interface end $ cat z1_63.f90 module m23456789012345678901234567890123456789012345678901234567890123 type t23456789012345678901234567890123456789012345678901234567890123 & (n23456789012345678901234567890123456789012345678901234567890123) integer, kind :: n23456789012345678901234567890123456789012345678901234567890123 end type type, extends (t23456789012345678901234567890123456789012345678901234567890123) :: & a23456789012345678901234567890123456789012345678901234567890123 end type interface module subroutine s23456789012345678901234567890123456789012345678901234567890123 & (x23456789012345678901234567890123456789012345678901234567890123) class(a23456789012345678901234567890123456789012345678901234567890123(8)) :: & x23456789012345678901234567890123456789012345678901234567890123 end end interface end $ gfortran-11-20200510 -c z1_61.f90 $ $ gfortran-11-20200510 -c z1_62.f90 f951: internal compiler error: Segmentation fault 0xbb93cf crash_signal ../../gcc/toplev.c:328 0x62fcb8 gfc_build_class_symbol(gfc_typespec*, symbol_attribute*, gfc_array_spec**) ../../gcc/fortran/class.c:653 0x6365ac build_sym ../../gcc/fortran/decl.c:1746 0x640e09 variable_decl ../../gcc/fortran/decl.c:2780 0x640e09 gfc_match_data_decl() ../../gcc/fortran/decl.c:6170 0x6a4533 match_word ../../gcc/fortran/parse.c:65 0x6a4533 decode_statement ../../gcc/fortran/parse.c:376 0x6a5f7a next_free ../../gcc/fortran/parse.c:1279 0x6a5f7a next_statement ../../gcc/fortran/parse.c:1511 0x6a8324 parse_spec ../../gcc/fortran/parse.c:3738 0x6a7cce parse_interface ../../gcc/fortran/parse.c:3601 0x6a7cce parse_spec ../../gcc/fortran/parse.c:3875 0x6ab59e parse_module ../../gcc/fortran/parse.c:6115 0x6ab8e7 gfc_parse_file() ../../gcc/fortran/parse.c:6428 0x6f7a7f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95068] [10/11 Regression] ICE in gfc_get_class_from_expr, at fortran/trans-expr.c:484
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95068 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-invalid-code --- Comment #1 from G. Steinmetz --- Further reduced (ICEs down to r7, r6 rejects it) : $ cat z2.f90 function f() result(x) associate (y => (f)) end associate end $ gfortran-11-20200510 -c z2.f90 z2.f90:2:20: 2 |associate (y => (f)) |1 Warning: Non-RECURSIVE procedure 'f' at (1) is possibly calling itself recursively. Declare it RECURSIVE or use '-frecursive' during RTL pass: expand z2.f90:2:0: 2 |associate (y => (f)) | internal compiler error: in convert_mode_scalar, at expr.c:313 0x8c13cc convert_mode_scalar ../../gcc/expr.c:313 0x8c13cc convert_move(rtx_def*, rtx_def*, int) ../../gcc/expr.c:297 0x8cd3f2 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode, expand_modifier) ../../gcc/expr.c:8670 0x7c3175 expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3786 0x7c3175 expand_gimple_stmt ../../gcc/cfgexpand.c:3847 0x7c7d57 expand_gimple_basic_block ../../gcc/cfgexpand.c:5887 0x7ca3ce execute ../../gcc/cfgexpand.c:6571 $ gfortran-11-20200510-chk -c z2.f90 z2.f90:2:20: 2 |associate (y => (f)) |1 Warning: Non-RECURSIVE procedure 'f' at (1) is possibly calling itself recursively. Declare it RECURSIVE or use '-frecursive' z2.f90:1:0: 1 | function f() result(x) | Error: non-trivial conversion in unary operation real(kind=4) real(kind=4) (void) y = ((f.0_1)); z2.f90:1:0: internal compiler error: 'verify_gimple' failed 0xd9158d verify_gimple_in_seq(gimple*) ../../gcc/tree-cfg.c:5113 0xa4ded1 gimplify_body(tree_node*, bool) ../../gcc/gimplify.c:14917 0xa4e187 gimplify_function_tree(tree_node*) ../../gcc/gimplify.c:14988 0x889347 cgraph_node::analyze() ../../gcc/cgraphunit.c:670 0x88c771 analyze_functions ../../gcc/cgraphunit.c:1227 0x88d982 symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2971
[Bug fortran/95068] New: [10/11 Regression] ICE in gfc_get_class_from_expr, at fortran/trans-expr.c:484
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95068 Bug ID: 95068 Summary: [10/11 Regression] ICE in gfc_get_class_from_expr, at fortran/trans-expr.c:484 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20190922 and 20190929 : $ cat z1.f90 program p type t end type contains function f() result(x) class(t), allocatable :: x associate (y => (f)) end associate end end $ gfortran-9 -c z1.f90 # no error z1.f90:7:23: 7 | associate (y => (f)) | 1 Warning: Non-RECURSIVE procedure 'f' at (1) is possibly calling itself recursively. Declare it RECURSIVE or use '-frecursive' $ gfortran-11-20200510-chk -c z1.f90 z1.f90:7:23: 7 | associate (y => (f)) | 1 Warning: Non-RECURSIVE procedure 'f' at (1) is possibly calling itself recursively. Declare it RECURSIVE or use '-frecursive' z1.f90:7:0: 7 | associate (y => (f)) | internal compiler error: tree check: expected class 'expression', have 'declaration' (function_decl) in tree_operand_check, at tree.h:3792 0x61669c tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc/tree.c:9736 0x776349 expr_check(tree_node*, char const*, int, char const*) ../../gcc/tree.h:3463 0x776349 tree_operand_check(tree_node*, int, char const*, int, char const*) ../../gcc/tree.h:3792 0x776349 gfc_get_class_from_expr(tree_node*) ../../gcc/fortran/trans-expr.c:484 0x7d2502 trans_associate_var ../../gcc/fortran/trans-stmt.c:2100 0x7d8d99 gfc_trans_block_construct(gfc_code*) ../../gcc/fortran/trans-stmt.c:2283 0x73a207 trans_code ../../gcc/fortran/trans.c:1960 0x77194d gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6835 0x77165c gfc_generate_contained_functions ../../gcc/fortran/trans-decl.c:5830 0x77165c gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6767 0x6ea066 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6ea066 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x7364ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/95067] New: [10/11 Regression] ICE in tree_fits_shwi_p, at tree.c:7262
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95067 Bug ID: 95067 Summary: [10/11 Regression] ICE in tree_fits_shwi_p, at tree.c:7262 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20190526 and 20190602, with option -gstabs : $ cat z1.f90 program p character(:), allocatable :: a character(3) :: b[*] a = 'abc' b[1] = a end $ gfortran-9 -c z1.f90 -fcoarray=lib -O2 -gstabs $ $ gfortran-11-20200510 -c z1.f90 -fcoarray=lib -O2 -gstabs during RTL pass: final z1.f90:6:0: 6 | end | internal compiler error: Segmentation fault 0xbb93cf crash_signal ../../gcc/toplev.c:328 0xe0d447 tree_fits_shwi_p(tree_node const*) ../../gcc/tree.c:7262 0x815e82 dbxout_range_type ../../gcc/dbxout.c:1740 0x81556a dbxout_type ../../gcc/dbxout.c:2042 0x8141d4 dbxout_type ../../gcc/dbxout.c:2334 0x8161fe dbxout_symbol_location ../../gcc/dbxout.c:3246 0x816f00 dbxout_symbol(tree_node*, int) ../../gcc/dbxout.c:2972 0x817f2e dbxout_syms(tree_node*) ../../gcc/dbxout.c:3428 0x81808c dbxout_block ../../gcc/dbxout.c:3791 0x8182a3 dbxout_function_decl ../../gcc/dbxout.c:1388 0x8d9399 rest_of_handle_final ../../gcc/final.c:4694 0x8d9399 execute ../../gcc/final.c:4736
[Bug fortran/93833] [8/9/10 Regression] ICE in trans_array_constructor, at fortran/trans-array.c:2566
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93833 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-valid-code --- Comment #4 from G. Steinmetz --- That example z1.f90 was obviously oversimplified and shrunk too much, here is a better one : $ cat z2.f90 program p character(:), allocatable :: c c = 'abc' call s contains subroutine s associate (y => [c]) if (any(y /= [c])) stop end associate end end
[Bug fortran/93552] [8/9/10 Regression][OpenACC] ICE in gfc_trans_exit, at fortran/trans-stmt.c:6110 since r7-6598-g02889d23ee3b0285
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93552 G. Steinmetz changed: What|Removed |Added Keywords|ice-on-valid-code |ice-on-invalid-code --- Comment #6 from G. Steinmetz --- No, it's invalid. Thanks!
[Bug fortran/93835] [9/10 Regression] ICE in simplify_findloc_nodim, at fortran/simplify.c:5513
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93835 G. Steinmetz changed: What|Removed |Added Keywords||ice-on-valid-code --- Comment #1 from G. Steinmetz --- This analogous variant works : $ cat z2.f90 program p print *, findloc([integer::], 1) end $ gfortran-10-20200216 z1.f90 && a.out 0 $
[Bug fortran/93835] New: [9/10 Regression] ICE in simplify_findloc_nodim, at fortran/simplify.c:5513
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93835 Bug ID: 93835 Summary: [9/10 Regression] ICE in simplify_findloc_nodim, at fortran/simplify.c:5513 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20181021 and 20181028 : $ cat z1.f90 program p print *, findloc(shape(1), 1) end $ gfortran-9-20181021 -c z1.f90 $ $ gfortran-10-20200216 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbae76f crash_signal ../../gcc/toplev.c:328 0x6d0d20 simplify_findloc_nodim ../../gcc/fortran/simplify.c:5513 0x6d9df9 gfc_simplify_findloc(gfc_expr*, gfc_expr*, gfc_expr*, gfc_expr*, gfc_expr*, gfc_expr*) ../../gcc/fortran/simplify.c:5779 0x6607f6 do_simplify ../../gcc/fortran/intrinsic.c:4638 0x66af6a gfc_intrinsic_func_interface(gfc_expr*, int) ../../gcc/fortran/intrinsic.c:4996 0x6c2b1e resolve_unknown_f ../../gcc/fortran/resolve.c:2894 0x6c2b1e resolve_function ../../gcc/fortran/resolve.c:3238 0x6c2b1e gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7000 0x6b9eac gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:6967 0x6b9eac gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11687 0x6c8d9f gfc_resolve_blocks(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:10714 0x6b8bd8 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:11677 0x6bb457 resolve_codes ../../gcc/fortran/resolve.c:17204 0x6bb51e gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17239 0x6a987c resolve_all_program_units ../../gcc/fortran/parse.c:6245 0x6a987c gfc_parse_file() ../../gcc/fortran/parse.c:6492 0x6f44ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/93834] New: [8/9/10 Regression] ICE in trans_caf_is_present, at fortran/trans-intrinsic.c:8469
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93834 Bug ID: 93834 Summary: [8/9/10 Regression] ICE in trans_caf_is_present, at fortran/trans-intrinsic.c:8469 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started to ICE with gfortran-7 : (derived from a valid z0.f90) $ cat z0.f90 program p integer, allocatable :: a[:] print *, allocated(a) end $ cat z1.f90 program p integer, allocatable :: a[:] print *, allocated(a[1]) end $ cat z2.f90 program p integer, allocatable :: a[:] if ( allocated(a[1]) ) stop end $ gfortran-10-20200216 -c z1.f90 -fcoarray=single $ $ gfortran-10-20200216 -c z1.f90 -fcoarray=lib z1.f90:3:0: 3 |print *, allocated(a[1]) | internal compiler error: in trans_caf_is_present, at fortran/trans-intrinsic.c:8469 0x79a4c3 trans_caf_is_present ../../gcc/fortran/trans-intrinsic.c:8469 0x79a4c3 gfc_conv_allocated ../../gcc/fortran/trans-intrinsic.c:8531 0x7aadab gfc_conv_intrinsic_function(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-intrinsic.c:9840 0x77d52a gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8665 0x787205 gfc_conv_expr_reference(gfc_se*, gfc_expr*, bool) ../../gcc/fortran/trans-expr.c:8810 0x7b2197 gfc_trans_transfer(gfc_code*) ../../gcc/fortran/trans-io.c:2582 0x735727 trans_code ../../gcc/fortran/trans.c:2084 0x7aecc2 build_dt ../../gcc/fortran/trans-io.c:2026 0x735747 trans_code ../../gcc/fortran/trans.c:2056 0x76cd5d gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6835 0x6e69a6 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6e69a6 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x731b3f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/93833] New: [8/9/10 Regression] ICE in trans_array_constructor, at fortran/trans-array.c:2566
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93833 Bug ID: 93833 Summary: [8/9/10 Regression] ICE in trans_array_constructor, at fortran/trans-array.c:2566 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started to ICE with gfortran-8 before 20180525 : $ cat z1.f90 program p character(:), allocatable :: c contains subroutine s associate (y => [c]) if (any(y /= [c])) stop end associate end end $ gfortran-7 -c z1.f90 $ $ gfortran-10-20200216 -c z1.f90 z1.f90:6:0: 6 | if (any(y /= [c])) stop | internal compiler error: in trans_array_constructor, at fortran/trans-array.c:2566 0x709197 trans_array_constructor ../../gcc/fortran/trans-array.c:2566 0x709197 gfc_add_loop_ss_code ../../gcc/fortran/trans-array.c:2924 0x709205 gfc_conv_loop_setup(gfc_loopinfo*, locus*) ../../gcc/fortran/trans-array.c:5216 0x744ecd gfc_conv_intrinsic_anyall ../../gcc/fortran/trans-intrinsic.c:4342 0x7523dd gfc_conv_intrinsic_anyall ../../gcc/fortran/trans-intrinsic.c:10203 0x7523dd gfc_conv_intrinsic_function(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-intrinsic.c:9898 0x72837a gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8665 0x72b1f3 gfc_conv_expr_val(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8718 0x763859 gfc_trans_if_1 ../../gcc/fortran/trans-stmt.c:1442 0x76b33a gfc_trans_if(gfc_code*) ../../gcc/fortran/trans-stmt.c:1480 0x6f7b67 trans_code ../../gcc/fortran/trans.c:1952 0x76b81f gfc_trans_block_construct(gfc_code*) ../../gcc/fortran/trans-stmt.c:2276 0x6f7bd7 trans_code ../../gcc/fortran/trans.c:1960 0x7210a4 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6835 0x720ea4 gfc_generate_contained_functions ../../gcc/fortran/trans-decl.c:5830 0x720ea4 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6767 0x6a9ec6 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6a9ec6 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6f44ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/93832] New: [8/9/10 Regression] ICE in gfc_convert_to_structure_constructor, at fortran/primary.c:3100
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93832 Bug ID: 93832 Summary: [8/9/10 Regression] ICE in gfc_convert_to_structure_constructor, at fortran/primary.c:3100 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started to ICE with gfortran-8 before 20180525 : $ cat z1.f90 program p type t character :: a integer :: b integer :: c(t(1)) end type type(t) :: z = t('a', 2, [3]) end $ gfortran-7 -c z1.f90 # error message doubled z1.f90:5:19: integer :: c(t(1)) 1 Error: No initializer for component 'b' given in the structure constructor at (1)! z1.f90:5:19: integer :: c(t(1)) 1 Error: No initializer for component 'b' given in the structure constructor at (1)! $ gfortran-10-20200216 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbae76f crash_signal ../../gcc/toplev.c:328 0x6aea05 gfc_convert_to_structure_constructor(gfc_expr*, gfc_symbol*, gfc_expr**, gfc_actual_arglist**, bool) ../../gcc/fortran/primary.c:3100 0x6c27a1 resolve_generic_f ../../gcc/fortran/resolve.c:2723 0x6c27a1 resolve_function ../../gcc/fortran/resolve.c:3230 0x6c27a1 gfc_resolve_expr(gfc_expr*) ../../gcc/fortran/resolve.c:7000 0x61a724 resolve_array_bound ../../gcc/fortran/array.c:378 0x61b396 gfc_resolve_array_spec(gfc_array_spec*, int) ../../gcc/fortran/array.c:422 0x6be945 resolve_component ../../gcc/fortran/resolve.c:14576 0x6bf4c2 resolve_fl_derived0 ../../gcc/fortran/resolve.c:14695 0x6bfb07 resolve_fl_derived0 ../../gcc/fortran/resolve.c:14782 0x6bfb07 resolve_fl_derived ../../gcc/fortran/resolve.c:14824 0x6bbf6f resolve_symbol ../../gcc/fortran/resolve.c:15198 0x6df9f2 do_traverse_symtree ../../gcc/fortran/symbol.c:4147 0x6b7754 resolve_types ../../gcc/fortran/resolve.c:17122 0x6bb50c gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17237 0x6a987c resolve_all_program_units ../../gcc/fortran/parse.c:6245 0x6a987c gfc_parse_file() ../../gcc/fortran/parse.c:6492 0x6f44ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/93814] New: [9/10 Regression] ICE in build_entry_thunks, at fortran/trans-decl.c:2898
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93814 Bug ID: 93814 Summary: [9/10 Regression] ICE in build_entry_thunks, at fortran/trans-decl.c:2898 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20190106 and 20190113 : $ cat z1.f90 function f() bind(c) character :: f, g entry g() bind(c) end $ gfortran-9-20190106 -c z1.f90 z1.f90:2:17: 2 | character :: f, g | 1 3 | entry g() bind(c) | 2 Error: Procedure 'g' with binding label 'g' at (1) uses the same global identifier as entity at (2) $ gfortran-10-20200216 -c z1.f90 z1.f90:1:0: 1 | function f() bind(c) | internal compiler error: Segmentation fault 0xbae76f crash_signal ../../gcc/toplev.c:328 0x71bfed tree_node** vec_safe_push(vec*&, tree_node* const&) ../../gcc/vec.h:792 0x71bfed build_entry_thunks ../../gcc/fortran/trans-decl.c:2898 0x71bfed gfc_create_function_decl(gfc_namespace*, bool) ../../gcc/fortran/trans-decl.c:3052 0x721eb6 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6729 0x6a9ec6 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6a9ec6 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6f44ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210
[Bug fortran/93813] New: [8/9/10 Regression] ICE in gfc_trans_select_type_cases, at fortran/trans-stmt.c:2874
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93813 Bug ID: 93813 Summary: [8/9/10 Regression] ICE in gfc_trans_select_type_cases, at fortran/trans-stmt.c:2874 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started to ICE with gfortran-7 : (r10 compiles with "associate (y => x)") $ cat z1.f90 program p type t end type type, extends(t) :: t2 end type class(t), allocatable :: x associate (y => (x)) select type (y) type is (t2) end select end associate end $ gfortran-6 -c z1.f90 $ $ gfortran-10-20200216 -c z1.f90 z1.f90:8:0: 8 | select type (y) | internal compiler error: Segmentation fault 0xbae76f crash_signal ../../gcc/toplev.c:328 0x76cafe gfc_trans_select_type_cases ../../gcc/fortran/trans-stmt.c:2874 0x76cafe gfc_trans_select_type(gfc_code*) ../../gcc/fortran/trans-stmt.c:3622 0x6f7c67 trans_code ../../gcc/fortran/trans.c:1980 0x76b81f gfc_trans_block_construct(gfc_code*) ../../gcc/fortran/trans-stmt.c:2276 0x6f7bd7 trans_code ../../gcc/fortran/trans.c:1960 0x7210a4 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6835 0x6a9ec6 translate_all_program_units ../../gcc/fortran/parse.c:6306 0x6a9ec6 gfc_parse_file() ../../gcc/fortran/parse.c:6545 0x6f44ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210