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/108502] New: ICE in gfc_check_dependency, at fortran/dependency.cc:1295
Date: Mon, 23 Jan 2023 17:48:04 +0000	[thread overview]
Message-ID: <bug-108502-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108502

            Bug ID: 108502
           Summary: ICE in gfc_check_dependency, at
                    fortran/dependency.cc:1295
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 :


$ cat z1.f90
integer function n()
   integer :: a(1)
   a = [1] / 0
end
program p
   integer :: b = n()
end


$ cat z3.f90
integer function n()
   implicit none
   integer :: a(1)
   a = [1] / 0
   n = 1
end
program p
   implicit none
   integer :: n
   integer :: b = n()
end


$ cat z5.f90
integer function n()
   implicit none
   integer :: a(1)
   a = [1] / 0
   n = 1
end
program p
   integer, parameter :: b = n()
end


$ gfortran-13-20230122 -c z1.f90 -O2
f951: internal compiler error: Segmentation fault
0xdaa49f crash_signal
        ../../gcc/toplev.cc:314
0x86f6e1 gfc_check_dependency(gfc_expr*, gfc_expr*, bool)
        ../../gcc/fortran/dependency.cc:1295
0x86f70a gfc_check_dependency(gfc_expr*, gfc_expr*, bool)
        ../../gcc/fortran/dependency.cc:1298
0x90be8b optimize_assignment
        ../../gcc/fortran/frontend-passes.cc:1684
0x90be8b optimize_code
        ../../gcc/fortran/frontend-passes.cc:329
0x90f679 gfc_code_walker(gfc_code**, int (*)(gfc_code**, int*, void*), int
(*)(gfc_expr**, int*, void*), void*)
        ../../gcc/fortran/frontend-passes.cc:5352
0x910a2a optimize_namespace
        ../../gcc/fortran/frontend-passes.cc:1479
0x910e7f gfc_run_passes(gfc_namespace*)
        ../../gcc/fortran/frontend-passes.cc:169
0x8417a8 gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.cc:17673
0x841bab gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.cc:2635
0x841bab resolve_global_procedure
        ../../gcc/fortran/resolve.cc:2637
0x838a66 resolve_function
        ../../gcc/fortran/resolve.cc:3306
0x838a66 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7195
0x7c77a4 gfc_reduce_init_expr(gfc_expr*)
        ../../gcc/fortran/expr.cc:3168
0x7ca700 gfc_match_init_expr(gfc_expr**)
        ../../gcc/fortran/expr.cc:3216
0x7b442b variable_decl
        ../../gcc/fortran/decl.cc:3036
0x7b442b gfc_match_data_decl()
        ../../gcc/fortran/decl.cc:6343
0x8215d3 match_word
        ../../gcc/fortran/parse.cc:67
0x8215d3 decode_statement
        ../../gcc/fortran/parse.cc:378
0x82301a next_free
        ../../gcc/fortran/parse.cc:1403

             reply	other threads:[~2023-01-23 17:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 17:48 gscfq@t-online.de [this message]
2023-01-23 20:12 ` [Bug fortran/108502] " anlauf at gcc dot gnu.org
2023-01-23 21:24 ` anlauf at gcc dot gnu.org
2023-01-23 21:51 ` cvs-commit at gcc dot gnu.org
2023-01-28 21:45 ` cvs-commit at gcc dot gnu.org
2023-02-04 15:43 ` cvs-commit at gcc dot gnu.org
2023-02-05 18:55 ` cvs-commit at gcc dot gnu.org
2023-02-05 18:59 ` 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-108502-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).