From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ED8913851C1B; Wed, 27 May 2020 19:04:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED8913851C1B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590606282; bh=aIEZsngtY5Vs8m+iKG7NFrZCJM6ygoyAtyI0avxXom8=; h=From:To:Subject:Date:From; b=x+J+11tvWT69TgSnGtgCy89ofzEvUISkYxF9dTiACGQl7h3c/xcCFqRwjxscjFHcZ /BsNYfOT/pGP+muA69VdFKlBPv+jescQ5vVMQwCqmzIwmkHGdnp2zv8r2OtkiG+fyv l34ZiL7e62MN0wPr8ivpN+1EYyghkvNZqoPFo5cs= From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/95375] New: ICE in add_use_op, Error: mismatching comparison operand types Date: Wed, 27 May 2020 19:04:42 +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: 11.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, 27 May 2020 19:04:43 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95375 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: gscfq@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() /=3D 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=3Dyes : $ gfortran-11-20200524 -c z1.f90 z1.f90:4:0: 4 | program p | Error: mismatching comparison operand types struct __class__STAR_a integer(kind=3D4) if (D.3926 !=3D 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=