public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anlauf at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/114874] New: [14/15 Regression] ICE with select type, type is (character(*)), and substring
Date: Sat, 27 Apr 2024 20:53:32 +0000	[thread overview]
Message-ID: <bug-114874-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 114874
           Summary: [14/15 Regression] ICE with select type, type is
                    (character(*)), and substring
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gcc dot gnu.org
  Target Milestone: ---

The following code fails for me with latest 14-branch/15-release candidate:

program p
  implicit none
  class(*), allocatable :: c
  c = 'abc'
  select type (c)
  type is (character(*))
     print *, c
     print *, c(2:2)  ! ICE
  end select
end

 p __copy_character_1hhh.f90:8:22:

    8 |      print *, c(2:2)  ! ICE
      |                      1
internal compiler error: Segmentation fault
0x10c6f6f crash_signal
        ../../gcc-14/gcc/toplev.cc:319
0xa7e6f1 gfc_conv_scalarized_array_ref
        ../../gcc-14/gcc/fortran/trans-array.cc:3938
0xa7f596 gfc_conv_array_ref(gfc_se*, gfc_array_ref*, gfc_expr*, locus*)
        ../../gcc-14/gcc/fortran/trans-array.cc:4094
0xac25ea gfc_conv_variable
        ../../gcc-14/gcc/fortran/trans-expr.cc:3181
0xac5be2 gfc_conv_expr_reference(gfc_se*, gfc_expr*)
        ../../gcc-14/gcc/fortran/trans-expr.cc:9935
0xaf00b6 gfc_trans_transfer(gfc_code*)
        ../../gcc-14/gcc/fortran/trans-io.cc:2609
0xa73157 trans_code
        ../../gcc-14/gcc/fortran/trans.cc:2583
0xaed036 build_dt
        ../../gcc-14/gcc/fortran/trans-io.cc:2053
0xa73177 trans_code
        ../../gcc-14/gcc/fortran/trans.cc:2555
0xb1471f gfc_trans_block_construct(gfc_code*)
        ../../gcc-14/gcc/fortran/trans-stmt.cc:2377
0xa73337 trans_code
        ../../gcc-14/gcc/fortran/trans.cc:2459
0xb0abf7 gfc_trans_select_type_cases
        ../../gcc-14/gcc/fortran/trans-stmt.cc:3020
0xb15ff4 gfc_trans_select_type(gfc_code*)
        ../../gcc-14/gcc/fortran/trans-stmt.cc:3729
0xa730a7 trans_code
        ../../gcc-14/gcc/fortran/trans.cc:2479
0xb1471f gfc_trans_block_construct(gfc_code*)
        ../../gcc-14/gcc/fortran/trans-stmt.cc:2377
0xa73337 trans_code
        ../../gcc-14/gcc/fortran/trans.cc:2459
0xaa8ed1 gfc_generate_function_code(gfc_namespace*)
        ../../gcc-14/gcc/fortran/trans-decl.cc:7880
0xa1b65f translate_all_program_units
        ../../gcc-14/gcc/fortran/parse.cc:7099
0xa1b65f gfc_parse_file()
        ../../gcc-14/gcc/fortran/parse.cc:7413
0xa6fe7f gfc_be_parse_file
        ../../gcc-14/gcc/fortran/f95-lang.cc:241

             reply	other threads:[~2024-04-27 20:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-27 20:53 anlauf at gcc dot gnu.org [this message]
2024-04-27 20:55 ` [Bug fortran/114874] " anlauf at gcc dot gnu.org
2024-04-27 21:05 ` anlauf at gcc dot gnu.org
2024-04-29 20:19 ` anlauf at gcc dot gnu.org
2024-04-29 20:22 ` anlauf at gcc dot gnu.org
2024-04-29 21:39 ` pault at gcc dot gnu.org
2024-04-30  6:43 ` pault at gcc dot gnu.org
2024-04-30  9:32 ` rguenth at gcc dot gnu.org
2024-04-30 17:19 ` pault at gcc dot gnu.org
2024-05-04 21:12 ` pault at gcc dot gnu.org
2024-05-07  7:45 ` rguenth at gcc dot gnu.org
2024-05-17 14:19 ` cvs-commit at gcc dot gnu.org
2024-05-17 14:23 ` cvs-commit at gcc dot gnu.org
2024-05-17 14:25 ` pault at gcc dot gnu.org
2024-05-22 17:55 ` 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-114874-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).