public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/78054] gfortran.dg/pr70673.f90 FAILs at -O0
Date: Tue, 26 Apr 2022 17:03:59 +0000	[thread overview]
Message-ID: <bug-78054-4-xVAhtr15Mj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-78054-4@http.gcc.gnu.org/bugzilla/>

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

kargl at gcc dot gnu.org changed:

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

--- Comment #4 from kargl at gcc dot gnu.org ---
(In reply to Hans-Peter Nilsson from comment #3)
> Now also failing execution at -O0 on cris-elf and apparently
> s390x-ibm-linux-gnu since r12-8227-g89ca0fffa48b79.

The code is clearly invalid Fortran.

module m
contains
  subroutine s(inp)
    character(*), intent(in) :: inp
    character(:), allocatable :: a

    a = a           ! This used to ICE.
!
! The above is an invalid reference of an unallocated allocatable on
! the RHS.
!
    a = inp
    a = a           ! This used to ICE too
    if ((len (a) .ne. 5) .or. (a .ne. "hello")) STOP 1
    a = a(2:3)      ! Make sure that temporary creation is not broken.
    if ((len (a) .ne. 2) .or. (a .ne. "el")) STOP 2
    deallocate (a)
    a = a           ! This would ICE too.
!
! The above is an invalid reference of an unallocated allocatable on
! the RHS.
!
  end subroutine s
end module m

  use m
  call s("hello")
end

You either need to remove the above two lines to get a valid program
or remove the testcase as it's testing processor dependent behavior.

  parent reply	other threads:[~2022-04-26 17:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-78054-4@http.gcc.gnu.org/bugzilla/>
2021-12-28 21:30 ` anlauf at gcc dot gnu.org
2022-04-26 14:35 ` hp at gcc dot gnu.org
2022-04-26 17:03 ` kargl at gcc dot gnu.org [this message]
2022-04-27  0:03 ` hp at gcc dot gnu.org
2022-04-27  1:51 ` sgk at troutmask dot apl.washington.edu
2022-04-27  5:47 ` tkoenig at gcc dot gnu.org
2022-04-27 16:50 ` tkoenig at gcc dot gnu.org
2022-04-27 18:39 ` anlauf at gcc dot gnu.org
2022-04-27 20:49 ` tkoenig at gcc dot gnu.org
2022-04-27 21:40 ` sgk at troutmask dot apl.washington.edu
2022-08-26 20:52 ` anlauf at gcc dot gnu.org
2023-08-15 20:26 ` 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-78054-4-xVAhtr15Mj@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).