public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/70231] Runtime error: Different CHARACTER lengths in array constructor with  allocatable array  and -O0
       [not found] <bug-70231-4@http.gcc.gnu.org/bugzilla/>
@ 2023-09-18 19:23 ` anlauf at gcc dot gnu.org
  2023-09-18 20:27 ` anlauf at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-09-18 19:23 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #3 from anlauf at gcc dot gnu.org ---
Created attachment 55925
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55925&action=edit
Patch

The issue here is that the "bounds check" does not properly initialize the
string length temporary that is used for checking.  The attached patch
uses what we have after calling get_array_ctor_strlen.

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

* [Bug fortran/70231] Runtime error: Different CHARACTER lengths in array constructor with  allocatable array  and -O0
       [not found] <bug-70231-4@http.gcc.gnu.org/bugzilla/>
  2023-09-18 19:23 ` [Bug fortran/70231] Runtime error: Different CHARACTER lengths in array constructor with allocatable array and -O0 anlauf at gcc dot gnu.org
@ 2023-09-18 20:27 ` anlauf at gcc dot gnu.org
  2023-09-19 17:15 ` cvs-commit at gcc dot gnu.org
  2023-09-19 19:16 ` anlauf at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-09-18 20:27 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #4 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2023-September/059762.html

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

* [Bug fortran/70231] Runtime error: Different CHARACTER lengths in array constructor with  allocatable array  and -O0
       [not found] <bug-70231-4@http.gcc.gnu.org/bugzilla/>
  2023-09-18 19:23 ` [Bug fortran/70231] Runtime error: Different CHARACTER lengths in array constructor with allocatable array and -O0 anlauf at gcc dot gnu.org
  2023-09-18 20:27 ` anlauf at gcc dot gnu.org
@ 2023-09-19 17:15 ` cvs-commit at gcc dot gnu.org
  2023-09-19 19:16 ` anlauf at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-19 17:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:15acabb80f91b12836bcf4ffcb92ea10fe4e8272

commit r14-4147-g15acabb80f91b12836bcf4ffcb92ea10fe4e8272
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Mon Sep 18 22:11:40 2023 +0200

    fortran: fix checking of CHARACTER lengths in array constructors [PR70231]

    gcc/fortran/ChangeLog:

            PR fortran/70231
            * trans-array.cc (trans_array_constructor): In absence of a
typespec,
            use string length determined by get_array_ctor_strlen() to
reasonably
            initialize auxiliary variable for bounds-checking.

    gcc/testsuite/ChangeLog:

            PR fortran/70231
            * gfortran.dg/bounds_check_fail_7.f90: New test.

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

* [Bug fortran/70231] Runtime error: Different CHARACTER lengths in array constructor with  allocatable array  and -O0
       [not found] <bug-70231-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-09-19 17:15 ` cvs-commit at gcc dot gnu.org
@ 2023-09-19 19:16 ` anlauf at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-09-19 19:16 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|---                         |14.0

--- Comment #6 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-14.  Closing.

Sorry that it took so long to fix.

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

end of thread, other threads:[~2023-09-19 19:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-70231-4@http.gcc.gnu.org/bugzilla/>
2023-09-18 19:23 ` [Bug fortran/70231] Runtime error: Different CHARACTER lengths in array constructor with allocatable array and -O0 anlauf at gcc dot gnu.org
2023-09-18 20:27 ` anlauf at gcc dot gnu.org
2023-09-19 17:15 ` cvs-commit at gcc dot gnu.org
2023-09-19 19:16 ` anlauf 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).