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/102312] New: [12 Regression] ICE in gfc_get_dtype_rank_type, at fortran/trans-types.c:1558
Date: Mon, 13 Sep 2021 17:27:33 +0000	[thread overview]
Message-ID: <bug-102312-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 102312
           Summary: [12 Regression] ICE in gfc_get_dtype_rank_type, at
                    fortran/trans-types.c:1558
           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: ---

Changed between 20210530 and 20210606 :


$ cat z1.f90
program p
   print *, f(null())
contains
   integer function f(x) bind(c)
      use iso_c_binding
      integer(kind=c_int), pointer, intent(in) :: x(..)
      f = 0
   end
end


$ cat z3.f90
recursive function f(x) result(z) bind(c)
   use iso_c_binding
   integer(kind=c_int), pointer, intent(in) :: x(..)
   real :: z
   z = f(null())
end


$ gfortran-11 -c z1.f90
$
$ gfortran-12-20210905 -c z1.f90
z1.f90:2:21:

    2 |    print *, f(null())
      |                     1
internal compiler error: in gfc_get_dtype_rank_type, at
fortran/trans-types.c:1558
0x89872f gfc_get_dtype_rank_type(int, tree_node*)
        ../../gcc/fortran/trans-types.c:1558
0x83f65a gfc_conv_scalar_to_descriptor(gfc_se*, tree_node*, symbol_attribute)
        ../../gcc/fortran/trans-expr.c:126
0x849ae8 gfc_conv_gfc_desc_to_cfi_desc
        ../../gcc/fortran/trans-expr.c:5577
0x84d9a7 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc/fortran/trans-expr.c:6009
0x8445ea gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:9020
0x84b402 gfc_conv_expr_reference(gfc_se*, gfc_expr*, bool)
        ../../gcc/fortran/trans-expr.c:9166
0x875597 gfc_trans_transfer(gfc_code*)
        ../../gcc/fortran/trans-io.c:2582
0x816527 trans_code
        ../../gcc/fortran/trans.c:2138
0x87307e build_dt
        ../../gcc/fortran/trans-io.c:2026
0x816507 trans_code
        ../../gcc/fortran/trans.c:2110
0x83cb64 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6918
0x7c2ee6 translate_all_program_units
        ../../gcc/fortran/parse.c:6569
0x7c2ee6 gfc_parse_file()
        ../../gcc/fortran/parse.c:6838
0x80f57f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216

             reply	other threads:[~2021-09-13 17:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 17:27 gscfq@t-online.de [this message]
2021-09-14  6:55 ` [Bug fortran/102312] " rguenth at gcc dot gnu.org
2021-09-14  7:23 ` [Bug fortran/102312] [9/10/11/12 Regression] ICE in gfc_get_dtype_rank_type, at fortran/trans-types.c:1558 since r9-5424-g92f3a180aaf6f3cd marxin at gcc dot gnu.org
2022-03-31 19:13 ` [Bug fortran/102312] [9/10/11 " anlauf at gcc dot gnu.org
2022-05-06  8:31 ` jakub at gcc dot gnu.org
2022-09-30 21:08 ` [Bug fortran/102312] [10/11 " anlauf at gcc dot gnu.org
2023-05-08 12:22 ` rguenth at gcc dot gnu.org
2023-05-08 19:25 ` 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-102312-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).