This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/49630] [OOP] ICE on obsolescent deferred-length type bound character function


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

--- Comment #2 from Hans-Werner Boschmann <boschmann at tp1 dot physik.uni-siegen.de> 2011-07-04 19:29:50 UTC ---
"C417: A function name shall not be declared with an asterisk type-param-value
unless it is of type CHAR- ACTER and is the name of the result of an external
function or the name of a dummy function."

So it is allowed to put an assumed character length into an interface, but not
in the way as I did in the code above. My example is invalid.

But how would I declare an abstract interface of a function with variable
length? I am allowed to use any scalar integer expression as length parameter
of a character function, but I cannot leave it empty in the interface. That's
why I use character(:),allocatable::res with the NAG fortran compiler. As far a
I know, this is the only valid way and that's why I am looking forward for
gfortran to implement it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]