[Bug fortran/87151] allocating array of character

2019-01-25 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87151

Paul Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Paul Thomas  ---
I cleared up a load of ASSOCIATE related bugs on trunk. Attempts to apply a
composite patch don't apply cleanly and so I am marking this as fixed.

Paul

[Bug fortran/87151] allocating array of character

2018-11-20 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87151

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #6 from Martin Liška  ---
Paul: Can the bug be marked as resolved?

[Bug fortran/87151] allocating array of character

2018-10-09 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87151

--- Comment #5 from Paul Thomas  ---
Author: pault
Date: Tue Oct  9 07:46:48 2018
New Revision: 264949

URL: https://gcc.gnu.org/viewcvs?rev=264949=gcc=rev
Log:
2018-10-09  Paul Thomas  

PR fortran/87151
* trans-array.c (gfc_get_array_span): Deal with deferred char
array components having a TYPE_MAX_VALUE of zero.
(gfc_array_init_size): Use the hidden string length component
to build the descriptor dtype.
(gfc_array_allocate): Remove the erroneous replacement of the
charlen backend decl with a temporary.
(gfc_conv_expr_descriptor): Use the ss_info string length in
the case of deferred character components.
(gfc_alloc_allocatable_for_assignment): Actually compare the
string lengths for deferred characters. Make sure that kind > 1
is handled correctly. Set the span field of the descriptor.
* trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
comment.

PR fortran/80931
* trans-array.c (gfc_array_allocate): Set the span field for
variable length character arrays.


2018-10-09  Paul Thomas  

PR fortran/87151
* gfortran.dg/deferred_type_component_3.f90: New test.

PR fortran/80931
* gfortran.dg/deferred_character_28.f90: New test.
* gfortran.dg/deferred_character_29.f90: New test (note that
this test appears in PR83196 comment #4 by mistake).


Added:
trunk/gcc/testsuite/gfortran.dg/deferred_character_28.f90
trunk/gcc/testsuite/gfortran.dg/deferred_character_29.f90
trunk/gcc/testsuite/gfortran.dg/deferred_type_component_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/87151] allocating array of character

2018-10-08 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87151

--- Comment #4 from Paul Thomas  ---
(In reply to Jürgen Reuter from comment #3)
> This now works with the actual trunk (r264898), and gives the anticipated
> result 
> 2 3. So either it was fixed by one of Paul's other fixes, or he just didn't
> comment on this one here. But of course it needs to be backported to 8- and
> 7-branches.

Juergen,

It turns out that if you try to do anything with the 'a' outside the subroutine
'create', all hell breaks loose with the gimplifier. I posted a proper fix to
this one yesterday and Dominique signalled to the list that it works as
intended.

Cheers

Paul

[Bug fortran/87151] allocating array of character

2018-10-08 Thread juergen.reuter at desy dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87151

--- Comment #3 from Jürgen Reuter  ---
This now works with the actual trunk (r264898), and gives the anticipated
result 
2 3. So either it was fixed by one of Paul's other fixes, or he just didn't
comment on this one here. But of course it needs to be backported to 8- and
7-branches.

[Bug fortran/87151] allocating array of character

2018-09-22 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87151

Paul Thomas  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |pault at gcc dot gnu.org

--- Comment #2 from Paul Thomas  ---
I am onto deferred character bugs right now so I will take this one :-)

Paul

[Bug fortran/87151] allocating array of character

2018-08-30 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87151

Dominique d'Humieres  changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-30
 Blocks||68241
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed from 4.9.3 up to trunk (9.0).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68241
[Bug 68241] [meta-bug] [F03] Deferred-length character