public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/106331] New: Whole array assignment of empty string segfaults with -Og
@ 2022-07-17  0:59 stuart_mentzer at objexx dot com
  2022-07-17 19:26 ` [Bug fortran/106331] [12/13 Regression] " anlauf at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: stuart_mentzer at objexx dot com @ 2022-07-17  0:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106331
           Summary: Whole array assignment of empty string segfaults with
                    -Og
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stuart_mentzer at objexx dot com
  Target Milestone: ---

Whole array assignment of the empty string to a character array segfaults if
built with -Og.

PROGRAM main
CHARACTER(LEN=24) :: a(2)
a = ''
END PROGRAM

These variations run OK:
- Not built with -Og
- Assignment is to scalar instead of array
- Assignment is a space character
- Assignment to element of the array


This is a regression I am seeing in 12.1.0 but did not get with 11.3.0.

Tested on MinGW (Windows 10) and Manjaro with GFortran 12.1.0.

The error message I get on Windows is:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-10-14 10:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-17  0:59 [Bug fortran/106331] New: Whole array assignment of empty string segfaults with -Og stuart_mentzer at objexx dot com
2022-07-17 19:26 ` [Bug fortran/106331] [12/13 Regression] " anlauf at gcc dot gnu.org
2022-07-18  7:21 ` 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

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).