Bug 38273 - Cray pointers: Document that pointers cannot be function return values
Summary: Cray pointers: Document that pointers cannot be function return values
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.4.0
: P3 enhancement
Target Milestone: ---
Assignee: Francois-Xavier Coudert
URL: http://gcc.gnu.org/ml/fortran/2010-06...
Keywords: documentation, patch
Depends on:
Blocks:
 
Reported: 2008-11-26 08:48 UTC by Tobias Burnus
Modified: 2010-06-10 20:03 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-06-10 19:51:38


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.