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/106331] [12/13 Regression] Whole array assignment of empty string segfaults with -Og
Date: Sun, 17 Jul 2022 19:26:21 +0000	[thread overview]
Message-ID: <bug-106331-4-TurlIX1SkQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106331-4@http.gcc.gnu.org/bugzilla/>

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Whole array assignment of   |[12/13 Regression] Whole
                   |empty string segfaults with |array assignment of empty
                   |-Og                         |string segfaults with -Og
   Last reconfirmed|                            |2022-07-17
                 CC|                            |anlauf at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Target Milestone|---                         |12.2
      Known to work|                            |11.3.1
      Known to fail|                            |12.1.1

--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed on x86_64-pc-linux-gnu with -m64 for character length 17 to 31.
For -m32 the issue does not show up, at least for the character length values
I tried.

Note however that replacing the array assignment

  a = ''

by an explicit loop

  do i = 1,2
     a(i) = ''
  end do

does not change the behavior of the reproducer.

valgrind a.out says:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x5b0fd6f in ???
#1  0x4005e7 in ???
#2  0x40061f in ???
#3  0x5afa2bc in ???
#4  0x400519 in ???
#5  0xffffffffffffffff in ???
==14463== 
==14463== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==14463==    at 0x5B0FCB9: raise (in /lib64/libc-2.31.so)
==14463==    by 0x5B0FD6F: ??? (in /lib64/libc-2.31.so)
==14463==    by 0x4005E6: MAIN__ (in /home/anlauf/gcc-bugs/a.out)
==14463==    by 0x40061F: main (in /home/anlauf/gcc-bugs/a.out)

I have no idea what is going on here...

  reply	other threads:[~2022-07-17 19:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-17  0:59 [Bug fortran/106331] New: " stuart_mentzer at objexx dot com
2022-07-17 19:26 ` anlauf at gcc dot gnu.org [this message]
2022-07-18  7:21 ` [Bug fortran/106331] [12/13 Regression] " tkoenig at gcc dot gnu.org
2022-07-18  8:10 ` rguenth at gcc dot gnu.org
2022-07-18  8:56 ` [Bug fortran/106331] [12/13 Regression] Whole array assignment of empty string segfaults with -Og since r12-2633-ge5e164effa30fd2b marxin at gcc dot gnu.org
2022-07-18 14:34 ` hjl.tools at gmail dot com
2022-07-18 14:43 ` hjl.tools at gmail dot com
2022-07-19  3:37 ` hjl.tools at gmail dot com
2022-07-19  7:41 ` rguenth at gcc dot gnu.org
2022-07-19  9:17 ` cvs-commit at gcc dot gnu.org
2022-07-19  9:18 ` [Bug middle-end/106331] [10/11/12 " rguenth at gcc dot gnu.org
2022-07-19 11:38 ` cvs-commit at gcc dot gnu.org
2022-07-19 11:43 ` [Bug middle-end/106331] [10/11 " rguenth at gcc dot gnu.org
2022-10-11 13:04 ` cvs-commit at gcc dot gnu.org
2022-10-14 10:47 ` [Bug middle-end/106331] [10 " cvs-commit at gcc dot gnu.org
2022-10-14 10:48 ` 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-106331-4-TurlIX1SkQ@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).