[Bug fortran/56226] New: Add support for DEC UNION and MAP extensions
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226 Bug #: 56226 Summary: Add support for DEC UNION and MAP extensions Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: russelljbren...@gmail.com Porting old f77 code for use with gfortran is fairly straightforward, even for most extensions. The UNION and MAP extensions thusfar prove impossible to port without modifying the UDT interface. Existing compilers can candle these extensions (intel ifort and portland group) but there is no open source alternative available afaik. UNIONs and MAPs are widely lamented exclusions of the later fortran standards. Addition of support for these extensions would facilitate automated conversion of much existing code to gfortran-compatible code.
[Bug fortran/56226] Add support for DEC UNION and MAP extensions
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226 --- Comment #2 from russelljbrennan at gmail dot com 2013-02-07 13:31:16 UTC --- It seems to me that the UNION/MAP pair is analogous to a basic form of a c/c++ union of structs. Could the corresponding code not be ganked and fitted to this application? I did notice in the IBM link that you provided that unions are only defined in an enclosing record structure... RECORDs and STRUCTUREs are easily replace with UDTs. It would make sense to me to allow UNION/MAP inside UDTs as well as RECORDs and STRUCTUREs.
[Bug fortran/56226] Add support for DEC UNION and MAP extensions
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226 --- Comment #4 from russelljbrennan at gmail dot com 2013-02-08 01:03:12 UTC --- >From a memory standpoint yes, union/map can be replaced by equivalence. From an API standpoint it cannot afaik. A suggestion for the former lies here http://stackoverflow.com/questions/14733238/convert-fortran-dec-union-map-extensions-to-anything-else
[Bug fortran/56226] Add support for DEC UNION and MAP extensions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56226 --- Comment #10 from russelljbrennan at gmail dot com --- Thanks for this Fritz! Should make a lot of people's lives much easier.