[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2016-11-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

janus at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |5.0

[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2016-05-03 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

Dominique d'Humieres  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #17 from Dominique d'Humieres  ---
*** Bug 60561 has been marked as a duplicate of this bug. ***

[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2015-03-25 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #16 from vehre at gcc dot gnu.org ---
Fixed with commit r221627.


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2015-03-24 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

--- Comment #15 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Tue Mar 24 11:47:45 2015
New Revision: 221627

URL: https://gcc.gnu.org/viewcvs?rev=221627&root=gcc&view=rev
Log:
2015-03-24  Andre Vehreschild  

PR fortran/55901
* trans-expr.c (gfc_conv_structure): Fixed indendation.
Using integer_zero_node now instead of explicitly
constructing a integer constant zero node.
(gfc_conv_derived_to_class): Add handling of _len component,
i.e., when the rhs has a string_length then assign that to
class' _len, else assign 0.
(gfc_conv_intrinsic_to_class): Likewise.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2015-03-19 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |WAITING
 CC||vehre at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

--- Comment #14 from vehre at gcc dot gnu.org ---
Fix available with:

https://gcc.gnu.org/ml/fortran/2015-03/msg00074.html
https://gcc.gnu.org/ml/fortran/2015-03/msg00075.html
https://gcc.gnu.org/ml/fortran/2015-03/msg00085.html

and

https://gcc.gnu.org/ml/fortran/2015-03/msg00086.html


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2015-01-18 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

--- Comment #13 from Paul Thomas  ---
Author: pault
Date: Sun Jan 18 12:21:38 2015
New Revision: 219814

URL: https://gcc.gnu.org/viewcvs?rev=219814&root=gcc&view=rev
Log:
2015-01-18  Paul Thomas  

PR fortran/55901
* primary.c (gfc_match_varspec): Exclude dangling associate-
names with dimension 0 from being counted as arrays.
* resolve.c (resolve_assoc_var): Sub-strings are permissible
for associate-names, so exclude characters from the test for
misuse as arrays.
* trans-decl.c (gfc_get_symbol_decl): Associate-names can use
the hidden string length variable of their associated target.
Signal this by setting 'length' to a constant, if the decl for
the string length is a variable.

2015-01-18  Paul Thomas  

PR fortran/55901
* gfortran.dg/associate_1.f03: Allow test for character with
automatic length.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/primary.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/associate_1.f03


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2015-01-07 Thread vehre at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

--- Comment #12 from Andre Vehreschild  ---
Hi Paul, hi Tobias,

I am guilty in asking both of you to look at the issue. I would be very happy,
if one of you two can really have a look into the issue and notify the other
one, that he found a reason for the issue and may be already has a solution. I
just want to get the issue resolved but not produce duplicate work.

Regards,
Andre


On Wed, 07 Jan 2015 13:16:25 +
"paul.richard.thomas at gmail dot com"  wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901
> 
> --- Comment #11 from paul.richard.thomas at gmail dot com
>  --- Hi Harald,
> 
> Happy New Year! I have been away in Claifornia these last few weeks and
> just got back last night.
> 
> I am working with Andre on pr60255 tonight. Once this is done, we should be
> in a position to fix pr55901 and have it do something useful!
> 
> Cheers
> 
> Paul
> 
> On 6 January 2015 at 20:50, anlauf at gmx dot de 
> wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901
> >
> > --- Comment #10 from Harald Anlauf  ---
> > (In reply to paul.richard.tho...@gmail.com from comment #9)
> > > By the way, the patch of comment 8 bootstraps and regtests OK
> > >
> > > Paul
> >
> > Hi Paul,
> >
> > any news on that patch?
> >
> > Harald
> >
> > --
> > You are receiving this mail because:
> > You are on the CC list for the bug.
> >
>


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2015-01-07 Thread paul.richard.thomas at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

--- Comment #11 from paul.richard.thomas at gmail dot com  ---
Hi Harald,

Happy New Year! I have been away in Claifornia these last few weeks and
just got back last night.

I am working with Andre on pr60255 tonight. Once this is done, we should be
in a position to fix pr55901 and have it do something useful!

Cheers

Paul

On 6 January 2015 at 20:50, anlauf at gmx dot de 
wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901
>
> --- Comment #10 from Harald Anlauf  ---
> (In reply to paul.richard.tho...@gmail.com from comment #9)
> > By the way, the patch of comment 8 bootstraps and regtests OK
> >
> > Paul
>
> Hi Paul,
>
> any news on that patch?
>
> Harald
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2015-01-06 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

--- Comment #10 from Harald Anlauf  ---
(In reply to paul.richard.tho...@gmail.com from comment #9)
> By the way, the patch of comment 8 bootstraps and regtests OK
> 
> Paul

Hi Paul,

any news on that patch?

Harald


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2014-12-14 Thread paul.richard.thomas at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

--- Comment #9 from paul.richard.thomas at gmail dot com  ---
By the way, the patch of comment 8 bootstraps and regtests OK

Paul


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2014-12-14 Thread paul.richard.thomas at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

paul.richard.thomas at gmail dot com  
changed:

   What|Removed |Added

 CC||paul.richard.thomas at gmail 
dot c
   ||om

--- Comment #8 from paul.richard.thomas at gmail dot com  ---
Created attachment 34281
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34281&action=edit
Partial patch for the PR

This patch removes the error and correctly converts the code, except for the
lack of a string length for the unlimited polymorphic entities/components in
both the testcase here and oo.f90.

Andre is attending to this but I will in the meantime submit this patch.

Cheers

Paul


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2014-12-09 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

Paul Thomas  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org,
   ||vehre at gmx dot de

--- Comment #7 from Paul Thomas  ---
(In reply to Harald Anlauf from comment #6)
> Any news on this one?

Dear Harald,

I'll take a look at it tonight. Andre is working on a patch that will allow the
likes of oo.f90 to work correctly with characters. This bug gets in the way and
so I will see what can be done :-) It should be trivial.

Cheers

Paul


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2014-12-04 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

--- Comment #6 from Harald Anlauf  ---
Any news on this one?


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2013-09-18 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901

janus at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-09-18
 CC||janus at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #5 from janus at gcc dot gnu.org ---
Here is another code which triggers this error:

ftp://ftp.numerical.rl.ac.uk/pub/MRandC/oo.f90

(cf. also
https://groups.google.com/forum/?fromgroups#!topic/comp.lang.fortran/aRz3HMpblTs)


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2013-04-08 Thread anlauf at gmx dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901



--- Comment #4 from Harald Anlauf  2013-04-08 18:16:06 
UTC ---

(In reply to comment #3)

> I am newbie to fortran, Can you please explain me in detail with an example.

> 

> Thanks in advance



Replace



character(len=*) :: s



in your code by e.g.



character(len=20) :: s



Then it will compile work.  This is a general Fortran issue

and has nothing to do with gfortran.



Note: the bugzilla should not be used to learn about Fortran.

Use a textbook about Fortran or the newsgroup "comp.lang.fortran"

which you can access via google groups.


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2013-04-08 Thread pdande1 at dow dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901



--- Comment #3 from pdande1 at dow dot com 2013-04-08 17:41:45 UTC ---

(In reply to comment #2)

> (In reply to comment #1)

> > program characterconversions

> > integer :: i=123

> > character(len=*) :: s

> > write(s,*) i

> > print *,s

> > end program

> > 

> > I am getting the below error while executing the above program (gcc version

> > 4.8.0 20130302 (experimental) [trunk revision 196403] (GCC))

> > 

> > Error: Entity with assumed character length  must be a dummy argument or a

> > PARAMETER|

> > ||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|

> 

> Your example has nothing to do with the original PR.

> 

> It is also invalid code: you must not use assumed character length (i.e. 
> len=*)

> in a main program.



Hi Harald,



I am newbie to fortran, Can you please explain me in detail with an example.



Thanks in advance


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2013-04-08 Thread anlauf at gmx dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901



--- Comment #2 from Harald Anlauf  2013-04-08 17:29:03 
UTC ---

(In reply to comment #1)

> program characterconversions

> integer :: i=123

> character(len=*) :: s

> write(s,*) i

> print *,s

> end program

> 

> I am getting the below error while executing the above program (gcc version

> 4.8.0 20130302 (experimental) [trunk revision 196403] (GCC))

> 

> Error: Entity with assumed character length  must be a dummy argument or a

> PARAMETER|

> ||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|



Your example has nothing to do with the original PR.



It is also invalid code: you must not use assumed character length (i.e. len=*)

in a main program.


[Bug fortran/55901] [OOP] type is (character(len=*)) misinterpreted as array

2013-04-08 Thread pdande1 at dow dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55901



pdande1 at dow dot com changed:



   What|Removed |Added



 CC||pdande1 at dow dot com



--- Comment #1 from pdande1 at dow dot com 2013-04-08 17:13:19 UTC ---

program characterconversions

integer :: i=123

character(len=*) :: s

write(s,*) i

print *,s

end program



I am getting the below error while executing the above program (gcc version

4.8.0 20130302 (experimental) [trunk revision 196403] (GCC))



Error: Entity with assumed character length  must be a dummy argument or a

PARAMETER|

||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|