Bug 38273

Summary: Cray pointers: Document that pointers cannot be function return values
Product: gcc Reporter: Tobias Burnus <burnus>
Component: fortranAssignee: Francois-Xavier Coudert <fxcoudert>
Status: RESOLVED FIXED    
Severity: enhancement CC: gcc-bugs
Priority: P3 Keywords: documentation, patch
Version: 4.4.0   
Target Milestone: ---   
URL: http://gcc.gnu.org/ml/fortran/2010-06/msg00099.html
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2010-06-10 19:51:38

Description Tobias Burnus 2008-11-26 08:48:02 UTC
http://groups.google.com/group/comp.lang.fortran/msg/b535884fdbd62f39

Intel has: in the manual
  "A pointer cannot be a function return value."

As gfortran also rejects it,
   Error: CRAY POINTER attribute conflicts with FUNCTION attribute at (1) 
one could also add it to the manual, or to say it in James Van Buskirk's words:

"We can see that gfortran doesn't like function results to be cray
pointers either, although I can't find this in the gfortran manual."
Comment 1 Paul Thomas 2009-03-14 09:58:27 UTC
There is no reason at all why this cannot be fixed.

Adding non-standard on non-standard doesn't seem too bad:-)

Paul
Comment 2 Francois-Xavier Coudert 2010-06-10 19:51:38 UTC
Patch proposed at: http://gcc.gnu.org/ml/fortran/2010-06/msg00099.html
Comment 3 Francois-Xavier Coudert 2010-06-10 20:03:07 UTC
Subject: Bug 38273

Author: fxcoudert
Date: Thu Jun 10 20:02:39 2010
New Revision: 160569

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160569
Log:
	PR fortran/38273
	* gfortran.texi: Document that Cray pointers cannot be function
	results.

	PR fortran/36234
	* gfortran.texi: Document lack of support for syntax
	"complex FUNCTION name*16()", and existence of alternative
	legacy syntax "complex*16 FUNCTION name()".

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.texi

Comment 4 Francois-Xavier Coudert 2010-06-10 20:03:37 UTC
Fixed.