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/107819] New: ICE in gfc_check_argument_var_dependency, at fortran/dependency.cc:978
Date: Tue, 22 Nov 2022 17:41:20 +0000	[thread overview]
Message-ID: <bug-107819-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 107819
           Summary: ICE in gfc_check_argument_var_dependency, at
                    fortran/dependency.cc:978
           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 :
(presumably processor dependent)


$ cat z1.f90
program p
   integer :: a(4) = [-1, -2, -3, -4]
   integer :: n(4) = [4, 2, 1, 3]
   call s (a(n), a)
   print *, a
contains
   elemental subroutine s (x, y)
      integer, value :: x
      integer, intent(out) :: y
      y = x
   end
end


$ cat z2.f90
program p
   integer :: a(1) = [-1]
   integer :: n(1) = [1]
   call s (a(n), a)
   print *, a
contains
   elemental subroutine s (x, y)
      integer, value :: x
      integer, intent(out) :: y
      y = x
   end
end


$ cat z6.f90
program p
   integer :: a(1) = [-1]
   integer :: n = 1
   call s (a(n:n), a)
   print *, a
contains
   elemental subroutine s (x, y)
      integer, value :: x
      integer, intent(out) :: y
      y = x
   end
end


$ cat z7.f90
program p
   implicit none
   integer, parameter :: m = 99
   integer :: i
   integer :: a(m) = [(-i,i=1,m)]
   integer :: n(m) = [(i,i=m,1,-1)]
   call s (a(n), a)
   print *, a
contains
   elemental subroutine s (x, y)
      integer, value :: x
      integer, intent(out) :: y
      y = x
   end
end


$ gfortran-13-20221120 -c z1.f90
z1.f90:4:19:

    4 |    call s (a(n), a)
      |                   1
internal compiler error: in gfc_check_argument_var_dependency, at
fortran/dependency.cc:978
0x8add39 gfc_check_argument_var_dependency
        ../../gcc/fortran/dependency.cc:978
0x8addcc gfc_check_argument_dependency
        ../../gcc/fortran/dependency.cc:1075
0x8addcc gfc_check_fncall_dependency(gfc_expr*, sym_intent, gfc_symbol*,
gfc_actual_arglist*, gfc_dep_check)
        ../../gcc/fortran/dependency.cc:1120
0x9640b0 gfc_conv_elemental_dependencies
        ../../gcc/fortran/trans-stmt.cc:267
0x9640b0 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool)
        ../../gcc/fortran/trans-stmt.cc:491
0x8be656 trans_code
        ../../gcc/fortran/trans.cc:2018
0x8f5379 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.cc:7674
0x86775e translate_all_program_units
        ../../gcc/fortran/parse.cc:6696
0x86775e gfc_parse_file()
        ../../gcc/fortran/parse.cc:7002
0x8b5a9f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:229

             reply	other threads:[~2022-11-22 17:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 17:41 gscfq@t-online.de [this message]
2022-11-22 17:42 ` [Bug fortran/107819] " gscfq@t-online.de
2022-11-22 19:41 ` anlauf at gcc dot gnu.org
2022-11-22 21:01 ` anlauf at gcc dot gnu.org
2022-11-24 13:12 ` mikael at gcc dot gnu.org
2022-11-24 17:07 ` anlauf at gcc dot gnu.org
2022-11-24 19:07 ` mikael at gcc dot gnu.org
2022-11-24 21:24 ` anlauf at gcc dot gnu.org
2022-11-24 21:40 ` mikael at gcc dot gnu.org
2022-11-24 22:02 ` mikael at gcc dot gnu.org
2022-11-25 22:06 ` anlauf at gcc dot gnu.org
2022-11-26 20:56 ` anlauf at gcc dot gnu.org
2022-11-26 21:05 ` mikael at gcc dot gnu.org
2022-11-27 20:33 ` anlauf at gcc dot gnu.org
2022-11-28 18:54 ` cvs-commit at gcc dot gnu.org
2022-11-28 21:27 ` anlauf at gcc dot gnu.org
2022-11-28 21:57 ` pinskia 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-107819-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).