public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/104228] [9/10/11/12 Regression] ICE in df_install_ref, at df-scan.cc:2294 since r8-3589-g707905d0773e5a8e
Date: Fri, 28 Jan 2022 16:19:00 +0000	[thread overview]
Message-ID: <bug-104228-4-LXE66tdX7P@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104228-4@http.gcc.gnu.org/bugzilla/>

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
If the testcase is extended to:
program p
   character(:), save, allocatable :: x(:)
   call s1
   call s2
   call s3
   call s4
contains
   subroutine s1
      associate (y1 => x)
         y1 = [x]
      end associate
   end
   subroutine s2
      associate (y2 => x)
         y2 = [x]
      end associate
   end
   subroutine s3
      associate (y3 => x)
         y3 = [x]
      end associate
   end
   subroutine s4
      associate (y4 => x)
         y4 = [x]
      end associate
   end
end

then the p program contains just one of those y vars (y4/.y4):
__attribute__((fn spec (". ")))
void p ()
{
  static voidD.27 s4D.4214 (void);
  static voidD.27 s3D.4216 (void);
  static voidD.27 s2D.4218 (void);
  static voidD.27 s1D.4220 (void);
  struct array01_character(kind=1) y4D.4244;
  static integer(kind=8)D.9 .y4D.4222;
  static struct array01_character(kind=1) xD.4255 = {.dataD.4250=0B};
  bitsizetype D.4401;
  sizetype D.4402;

  D.4401 = (bitsizetype) (sizetype) NON_LVALUE_EXPR <.y4D.4222> * 8;
  D.4402 = (sizetype) NON_LVALUE_EXPR <.y4D.4222>;
  s1D.4220 ();
  s2D.4218 ();
  s3D.4216 ();
  s4D.4214 ();
}

Now, if that .y4 randomly called based on one of the associate users is just
named character length of the x
array (shouldn't it be called .x ?) of a SAVE var in p, I'd think it should go
to the BLOCK where x is defined and nowhere else, all the nested functions (==
contained subroutines) should refer to it non-locally and shouldn't have it in
its BLOCK_VARS.

  parent reply	other threads:[~2022-01-28 16:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 18:04 [Bug fortran/104228] New: [9/10/11/12 Regression] ICE in df_install_ref, at df-scan.cc:2294 gscfq@t-online.de
2022-01-26  7:49 ` [Bug fortran/104228] " rguenth at gcc dot gnu.org
2022-01-26  8:25 ` [Bug fortran/104228] [9/10/11/12 Regression] ICE in df_install_ref, at df-scan.cc:2294 since r8-3589-g707905d0773e5a8e marxin at gcc dot gnu.org
2022-01-28 15:42 ` jakub at gcc dot gnu.org
2022-01-28 15:52 ` jakub at gcc dot gnu.org
2022-01-28 16:19 ` jakub at gcc dot gnu.org [this message]
2022-01-28 21:19 ` mikael at gcc dot gnu.org
2022-02-13 16:01 ` cvs-commit at gcc dot gnu.org
2022-03-09 13:22 ` [Bug fortran/104228] [9/10/11 " rguenth at gcc dot gnu.org
2022-03-19 20:17 ` cvs-commit at gcc dot gnu.org
2022-04-10 18:48 ` cvs-commit at gcc dot gnu.org
2022-04-10 18:48 ` cvs-commit at gcc dot gnu.org
2022-04-24 16:54 ` cvs-commit at gcc dot gnu.org
2022-05-09 11:22 ` cvs-commit at gcc dot gnu.org
2022-05-09 11:27 ` mikael 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-104228-4-LXE66tdX7P@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).