public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/115528] [15 regression] segmentation fault in legacy F77 code since r15-1238-g1fe55a1794863b
Date: Fri, 21 Jun 2024 10:30:54 +0000	[thread overview]
Message-ID: <bug-115528-4-xwuaJAEepG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-115528-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
           Keywords|needs-reduction             |
             Status|WAITING                     |ASSIGNED

--- Comment #21 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  We're vectorizing the outer loop here

        do i = 1,4
           do j = 1,4
              HADCUR(I)=
     $            HADCUR(I)+CMPLX(COEF1)*FORM1*AA(I,J)*(PP(K,J)-PP(4,J))
           end do
        end do

and the issue is we're doing

=> 0x00000000006b7218 <+2504>:  movapd 0x0(%r13),%xmm1

on

(gdb) p/x $r13
$2 = 0x7fffffffb5d8

which is an unaligned address.  This is the access to AA.

The following reproduces the issue with -O2 -fno-inline:

      subroutine init(COEF1,FORM1,AA)
      double precision COEF1,X
      double complex FORM1
      double precision AA(4,4)
      COEF1=0
      FORM1=0
      AA=0
      end
      subroutine curr(HADCUR)
      double precision COEF1
      double complex HADCUR(4),FORM1
      double precision AA(4,4)
      call init(COEF1,FORM1,AA)
      do i = 1,4
         do j = 1,4
            HADCUR(I)=
     $         HADCUR(I)+CMPLX(COEF1)*FORM1*AA(I,J)
         end do
      end do
      end
      program test
        double complex HADCUR(4)
        hadcur=0
        call curr(hadcur)
      end

  parent reply	other threads:[~2024-06-21 10:30 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 20:56 [Bug fortran/115528] New: [15 regression] segmentation fault in legacy F77 code juergen.reuter at desy dot de
2024-06-17 21:01 ` [Bug fortran/115528] " pinskia at gcc dot gnu.org
2024-06-17 21:18 ` juergen.reuter at desy dot de
2024-06-18  6:31 ` [Bug middle-end/115528] " rguenth at gcc dot gnu.org
2024-06-18 10:47 ` juergen.reuter at desy dot de
2024-06-18 17:50 ` kargls at comcast dot net
2024-06-18 21:52 ` juergen.reuter at desy dot de
2024-06-18 21:54 ` juergen.reuter at desy dot de
2024-06-19  6:11 ` juergen.reuter at desy dot de
2024-06-19  9:30 ` juergen.reuter at desy dot de
2024-06-19 11:53 ` juergen.reuter at desy dot de
2024-06-19 13:49 ` juergen.reuter at desy dot de
2024-06-19 13:53 ` sjames at gcc dot gnu.org
2024-06-20  5:45 ` juergen.reuter at desy dot de
2024-06-20  7:15 ` juergen.reuter at desy dot de
2024-06-20  7:36 ` juergen.reuter at desy dot de
2024-06-20  9:17 ` [Bug middle-end/115528] [15 regression] segmentation fault in legacy F77 code since r15-1238-g1fe55a1794863b rguenth at gcc dot gnu.org
2024-06-20 10:08 ` juergen.reuter at desy dot de
2024-06-20 11:20 ` rguenth at gcc dot gnu.org
2024-06-20 22:55 ` juergen.reuter at desy dot de
2024-06-21  5:26 ` kargls at comcast dot net
2024-06-21 10:30 ` rguenth at gcc dot gnu.org [this message]
2024-06-21 11:19 ` rguenth at gcc dot gnu.org
2024-06-22 13:23 ` juergen.reuter at desy dot de
2024-06-22 13:27 ` rguenth at gcc dot gnu.org
2024-06-22 13:29 ` juergen.reuter at desy dot de
2024-06-22 13:33 ` juergen.reuter at desy dot de
2024-06-22 13:34 ` juergen.reuter at desy dot de
2024-06-24  6:54 ` juergen.reuter at desy dot de
2024-06-24  7:25 ` rguenth at gcc dot gnu.org
2024-06-24 11:28 ` cvs-commit at gcc dot gnu.org
2024-06-24 11:29 ` rguenth 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-115528-4-xwuaJAEepG@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).