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/102458] ICE tree check: expected array_type, have pointer_type in gfc_conv_array_initializer, at fortran/trans-array.c:6136
Date: Wed, 22 Sep 2021 17:42:46 +0000	[thread overview]
Message-ID: <bug-102458-4-1HlfCmTAo0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102458-4@http.gcc.gnu.org/bugzilla/>

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

G. Steinmetz <gscfq@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code

--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---

There are several variants :


$ cat z3.f90
subroutine s
   integer :: a(num_images()) = 1
   print *, a
end


$ cat z4.f90
subroutine s
   integer :: a(this_image()) = 1
   print *, a
end


$ cat z7.f90
subroutine s
   integer :: a(command_argument_count()) = 1
   a = 2
end


$ cat z8.f90
program p
   block
      integer :: a(command_argument_count()) = 1
      print *, a
   end block
end


$ cat za.f90
function f()
   integer :: a(command_argument_count()) = 0
   a = 1
end


$ cat zb.f90
program p
   block
      integer :: n(command_argument_count()) = 0
      n = 1
   end block
end


$ gfortran-12-20210919 -c zb.f90
zb.f90:3:44:

    3 |       integer :: n(command_argument_count()) = 0
      |                                            1
internal compiler error: in gfc_trans_auto_array_allocation, at
fortran/trans-array.c:6426
0x797a5b gfc_trans_auto_array_allocation(tree_node*, gfc_symbol*,
gfc_wrapped_block*)
        ../../gcc/fortran/trans-array.c:6426
0x7b1f17 gfc_trans_deferred_vars(gfc_symbol*, gfc_wrapped_block*)
        ../../gcc/fortran/trans-decl.c:4921
0x8054e1 gfc_trans_block_construct(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:2311
0x78e4a7 trans_code
        ../../gcc/fortran/trans.c:2014
0x7b4c04 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6919
0x73af76 translate_all_program_units
        ../../gcc/fortran/parse.c:6572
0x73af76 gfc_parse_file()
        ../../gcc/fortran/parse.c:6841
0x78761f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216

  reply	other threads:[~2021-09-22 17:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 17:42 [Bug fortran/102458] New: " gscfq@t-online.de
2021-09-22 17:42 ` gscfq@t-online.de [this message]
2021-09-22 19:07 ` [Bug fortran/102458] " anlauf at gcc dot gnu.org
2021-09-22 19:55 ` kargl at gcc dot gnu.org
2021-09-22 20:01 ` anlauf at gcc dot gnu.org
2021-09-22 20:03 ` kargl at gcc dot gnu.org
2021-09-22 20:43 ` anlauf at gcc dot gnu.org
2021-09-22 21:17 ` anlauf at gcc dot gnu.org
2021-09-22 23:18 ` sgk at troutmask dot apl.washington.edu
2021-09-23 19:28 ` anlauf at gcc dot gnu.org
2021-09-23 19:52 ` anlauf at gcc dot gnu.org
2021-09-24 17:11 ` cvs-commit at gcc dot gnu.org
2021-09-27 21:14 ` anlauf at gcc dot gnu.org
2021-09-29 19:22 ` anlauf at gcc dot gnu.org
2021-09-30 18:29 ` cvs-commit at gcc dot gnu.org
2021-10-03 19:34 ` cvs-commit at gcc dot gnu.org
2021-10-03 19:34 ` cvs-commit at gcc dot gnu.org
2021-10-05 19:51 ` cvs-commit at gcc dot gnu.org
2021-10-05 19:51 ` cvs-commit at gcc dot gnu.org
2021-10-05 19:53 ` 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-102458-4-1HlfCmTAo0@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).