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

anlauf at gmx dot de gcc-bugzilla@gcc.gnu.org
Mon Apr 8 17:29:00 GMT 2013


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

--- Comment #2 from Harald Anlauf <anlauf at gmx dot de> 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.



More information about the Gcc-bugs mailing list