From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D0C503858400; Wed, 22 Sep 2021 17:40:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0C503858400 From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/102457] New: [PDT] ICE in fold_convert_const_int_from_real, at fold-const.c:2034 Date: Wed, 22 Sep 2021 17:40:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2021 17:40:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102457 Bug ID: 102457 Summary: [PDT] ICE in fold_convert_const_int_from_real, at fold-const.c:2034 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Started with r8 (type mismatch/non-constant) : $ cat z1.f90 subroutine s real :: m =3D 2 type t(n) integer, len :: n =3D 1 character(n*n) :: c end type type(t(m)) :: x call h(x) end $ gfortran-12-20210919 -c z1.f90 -O2 during GIMPLE pass: ccp z1.f90:1:12: 1 | subroutine s | ^ internal compiler error: in fold_convert_const_int_from_real, at fold-const.c:2034 0x98904b fold_convert_const_int_from_real ../../gcc/fold-const.c:2034 0x98904b fold_convert_const ../../gcc/fold-const.c:2280 0x99f05d const_unop(tree_code, tree_node*, tree_node*) ../../gcc/fold-const.c:1741 0x10773fe gimple_resimplify1 ../../gcc/gimple-match-head.c:212 0x11ab337 gimple_simplify(gimple*, gimple_match_op*, gimple**, tree_node* (*)(tree_node*), tree_node* (*)(tree_node*)) ../../gcc/gimple-match-head.c:948 0x9d289f gimple_fold_stmt_to_constant_1(gimple*, tree_node* (*)(tree_node*), tree_node* (*)(tree_node*)) ../../gcc/gimple-fold.c:7350 0xd6e279 ccp_fold ../../gcc/tree-ssa-ccp.c:1289 0xd6e279 evaluate_stmt ../../gcc/tree-ssa-ccp.c:2207 0xd6f92d visit_assignment ../../gcc/tree-ssa-ccp.c:2840 0xdfaad3 ssa_propagation_engine::simulate_stmt(gimple*) ../../gcc/tree-ssa-propagate.c:230 0xdfad4a ssa_propagation_engine::simulate_block(basic_block_def*) ../../gcc/tree-ssa-propagate.c:337 0xdfb252 ssa_propagation_engine::ssa_propagate() ../../gcc/tree-ssa-propagate.c:504 0xd65725 do_ssa_ccp ../../gcc/tree-ssa-ccp.c:2959 0xd65725 execute ../../gcc/tree-ssa-ccp.c:3003 --- z1.f90:1:12: 1 | subroutine s | ^ Error: type mismatch in binary expression integer(kind=3D4) real(kind=3D4) real(kind=3D4) _5 =3D m.1_3 * m.2_4; z1.f90:1:12: internal compiler error: 'verify_gimple' failed 0xe7461d verify_gimple_in_seq(gimple*) ../../gcc/tree-cfg.c:5228 0xb16a51 gimplify_body(tree_node*, bool) ../../gcc/gimplify.c:15897 0xb16cf7 gimplify_function_tree(tree_node*) ../../gcc/gimplify.c:15968 0x9338c7 cgraph_node::analyze() ../../gcc/cgraphunit.c:670 0x936a86 analyze_functions ../../gcc/cgraphunit.c:1234 0x937c8d symbol_table::finalize_compilation_unit() ../../gcc/cgraphunit.c:2508=