From: Harald Anlauf <anlauf@gmx.de>
To: Harald Anlauf <anlauf@gmx.de>
Cc: Jerry DeLisle <jvdelisle@charter.net>,
fortran <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] PR libfortran/99218 - [8/9/10/11 Regression] matmul on temporary array accesses invalid memory
Date: Fri, 5 Mar 2021 20:56:17 +0100 [thread overview]
Message-ID: <trinity-6bcff02e-f87b-43c7-895f-5476e4a2c98b-1614974176975@3c-app-gmx-bs16> (raw)
In-Reply-To: <trinity-2f520afb-adff-4bb2-a950-ffeaf4edc291-1614889380854@3c-app-gmx-bs53>
Dear all,
I finally figured out that the array dimensions simply need to be
large enough to get invalid memory accesses that actual lead to a
crash.
I will commit the following testcase along with the fix to libfortran:
! { dg-do run }
! PR libfortran/99218 - matmul on temporary array accesses invalid memory
program p
implicit none
integer, parameter :: nState = 300000
integer, parameter :: nCon = 1
real, parameter :: ZERO = 0.0
real :: G(nCon,nState) = ZERO
real :: H(nState,nCon) = ZERO
real :: lambda(nCon) = ZERO
real :: f(nState) = ZERO
f = matmul (transpose (G), lambda)
if (f(1) /= ZERO) stop 1
end program
Cheers,
Harald
prev parent reply other threads:[~2021-03-05 19:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-23 21:46 Harald Anlauf
2021-03-01 22:19 ` *PING* " Harald Anlauf
2021-03-04 2:16 ` Jerry DeLisle
2021-03-04 20:23 ` Aw: " Harald Anlauf
2021-03-05 19:56 ` Harald Anlauf [this message]
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=trinity-6bcff02e-f87b-43c7-895f-5476e4a2c98b-1614974176975@3c-app-gmx-bs16 \
--to=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jvdelisle@charter.net \
/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).