public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-95375-4@http.gcc.gnu.org/bugzilla/> (raw)

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: 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() /= 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 <D.3927>; else goto <D.3928>;
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

             reply	other threads:[~2020-05-27 19:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 19:04 gscfq@t-online.de [this message]
2020-06-09 10:51 ` [Bug fortran/95375] " dominiq at lps dot ens.fr
2021-10-24 23:54 ` sandra at gcc dot gnu.org
2022-07-08 20:10 ` anlauf at gcc dot gnu.org
2022-12-20 20:41 ` anlauf at gcc dot gnu.org
2022-12-20 21:24 ` cvs-commit at gcc dot gnu.org
2022-12-20 21:27 ` anlauf at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-95375-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).