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/102787] [12 regression] ICE in new test case gfortran.dg/reshape_shape_2.f90
Date: Fri, 15 Oct 2021 19:52:37 +0000	[thread overview]
Message-ID: <bug-102787-4-3iNasIfe6a@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102787-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from anlauf at gcc dot gnu.org ---
Interesting.  Cannot reproduce on x86_64-pc-linux-gnu.

However, changing the testcase as follows:

program p
  integer, parameter :: a(1) = 2
! integer, parameter :: b(2) = reshape([3,4], -[a]) ! { dg-error "negative" }
  integer, parameter :: b(2) = reshape([3,4], - a ) ! { dg-error "negative" }
end

thus removing the array constructor, I get an error pointing to the wrong line:

reshape_shape_2a.f90:5:30:

    5 |   integer, parameter :: a(1) = 2
      |                              1
Error: 'shape' argument of 'reshape' intrinsic at (1) has negative element (-2)

which is (correctly) coming from gfc_check_reshape that shows up in your
backtrace.

Possibly several latent issues uncovered by the testcase.
Need to dig deeper.

  reply	other threads:[~2021-10-15 19:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-15 18:58 [Bug fortran/102787] New: " seurer at gcc dot gnu.org
2021-10-15 19:52 ` anlauf at gcc dot gnu.org [this message]
2021-10-15 20:37 ` [Bug fortran/102787] " anlauf at gcc dot gnu.org
2021-10-15 23:51 ` [Bug fortran/102787] " pinskia at gcc dot gnu.org
2021-10-16 12:24 ` dominiq at lps dot ens.fr
2021-10-16 12:26 ` dominiq at lps dot ens.fr
2021-10-17 20:10 ` anlauf at gcc dot gnu.org
2021-10-18 21:55 ` anlauf at gcc dot gnu.org
2021-10-20 20:58 ` anlauf at gcc dot gnu.org
2021-11-26 21:31 ` anlauf at gcc dot gnu.org
2021-11-30 20:19 ` anlauf at gcc dot gnu.org
2021-11-30 21:10 ` cvs-commit at gcc dot gnu.org
2021-11-30 21:19 ` anlauf at gcc dot gnu.org
2021-11-30 21:21 ` anlauf at gcc dot gnu.org
2021-12-04 22:06 ` cvs-commit at gcc dot gnu.org
2021-12-11 21:57 ` cvs-commit at gcc dot gnu.org
2021-12-11 21:59 ` 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-102787-4-3iNasIfe6a@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).