This is the mail archive of the gcc-patches@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]

[PATCH] Cray pointers to procedures


:ADDPATCH fortran:

A while back, there was a discussion on comp.lang.fortran regarding Cray pointers to procedures:

http://groups.google.com/group/comp.lang.fortran/browse_frm/thread/c0528d0a3d4fd41a/

Attached is a short patch that implements this in gfortran. This is very non-standard; ifort accepts Cray pointers to procedures, while pgf90, xlf90, and Pathscale reject them. I don't think these are widely used, but as the attached patch shows, the basic functionality is already there, so this feature is essentially free. This patch was bootstrapped and regression tested on x86 and x86_64 Linux.

-Asher


gcc/fortran/
2006-5-25 Asher Langton <langton2@llnl.gov>
* symbol.c (check_conflict): Allow external, function, and subroutine attributes with Cray
pointees.
* trans-expr.c (gfc_conv_function_val): Translate Cray pointees that point to procedures.


gcc/testsuite/
2006-5-25  Asher Langton  <langton2@llnl.gov>
	* cray_pointers_7.f90: New test.

Attachment: %procptrs.diff
Description: application/applefile

Attachment: procptrs.diff
Description: Binary data

Attachment: %cray_pointers_7.f90
Description: application/applefile

Attachment: cray_pointers_7.f90
Description: Binary data


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