This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49630] [OOP] ICE on obsolescent deferred-length type bound character function
- From: "boschmann at tp1 dot physik.uni-siegen.de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 4 Jul 2011 19:30:19 +0000
- Subject: [Bug fortran/49630] [OOP] ICE on obsolescent deferred-length type bound character function
- Auto-submitted: auto-generated
- References: <bug-49630-4@http.gcc.gnu.org/bugzilla/>
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.