[Bug fortran/59252] [F03] wrong code generation for allocatable character component

2025-02-20 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59252

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |13.4
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #11 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-15, and backported to 14- and 13-branches.  Closing.

[Bug fortran/59252] [F03] wrong code generation for allocatable character component

2025-02-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59252

--- Comment #10 from GCC Commits  ---
The releases/gcc-13 branch has been updated by Harald Anlauf
:

https://gcc.gnu.org/g:0c3061fe7367b378eb8adf4845fde914faca1f40

commit r13-9384-g0c3061fe7367b378eb8adf4845fde914faca1f40
Author: Harald Anlauf 
Date:   Fri Feb 7 21:21:10 2025 +0100

Fortran: fix initialization of allocatable non-deferred character [PR59252]

PR fortran/59252

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_trans_subcomponent_assign): Initialize
allocatable non-deferred character with NULL properly.

gcc/testsuite/ChangeLog:

* gfortran.dg/allocatable_char_1.f90: New test.

(cherry picked from commit 818c36a85e3faec5442eb26799bfa3bba7764b36)

[Bug fortran/59252] [F03] wrong code generation for allocatable character component

2025-02-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59252

--- Comment #9 from GCC Commits  ---
The releases/gcc-14 branch has been updated by Harald Anlauf
:

https://gcc.gnu.org/g:5ec7193faa7a5a78dd5382aec220a49f4a76a976

commit r14-11309-g5ec7193faa7a5a78dd5382aec220a49f4a76a976
Author: Harald Anlauf 
Date:   Fri Feb 7 21:21:10 2025 +0100

Fortran: fix initialization of allocatable non-deferred character [PR59252]

PR fortran/59252

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_trans_subcomponent_assign): Initialize
allocatable non-deferred character with NULL properly.

gcc/testsuite/ChangeLog:

* gfortran.dg/allocatable_char_1.f90: New test.

(cherry picked from commit 818c36a85e3faec5442eb26799bfa3bba7764b36)

[Bug fortran/59252] [F03] wrong code generation for allocatable character component

2025-02-07 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59252

--- Comment #8 from GCC Commits  ---
The master branch has been updated by Harald Anlauf :

https://gcc.gnu.org/g:818c36a85e3faec5442eb26799bfa3bba7764b36

commit r15-7433-g818c36a85e3faec5442eb26799bfa3bba7764b36
Author: Harald Anlauf 
Date:   Fri Feb 7 21:21:10 2025 +0100

Fortran: fix initialization of allocatable non-deferred character [PR59252]

PR fortran/59252

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_trans_subcomponent_assign): Initialize
allocatable non-deferred character with NULL properly.

gcc/testsuite/ChangeLog:

* gfortran.dg/allocatable_char_1.f90: New test.

[Bug fortran/59252] [F03] wrong code generation for allocatable character component

2025-02-07 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59252

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |anlauf at gcc dot 
gnu.org

--- Comment #7 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2025-February/061703.html

[Bug fortran/59252] [F03] wrong code generation for allocatable character component

2025-02-06 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59252

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 CC||anlauf at gcc dot gnu.org

--- Comment #6 from anlauf at gcc dot gnu.org ---
Created attachment 60404
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60404&action=edit
Another draft patch

This tentative patch does the initialization of allocatable components with
NULL, unless it is a character component of deferred length.

[Bug fortran/59252] [F03] wrong code generation for allocatable character component

2024-11-20 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59252

--- Comment #5 from anlauf at gcc dot gnu.org ---
Created attachment 59654
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59654&action=edit
Reduced testcase

Smaller testcase for easier debugging.  It appears essential that the ultimate
component is of type(character):

 character(256), allocatable :: label

[Bug fortran/59252] [F03] wrong code generation for allocatable character component

2017-09-18 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59252

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
   Assignee|janus at gcc dot gnu.org   |unassigned at gcc dot 
gnu.org