Bug 22547 - Fortran 2003: ISO_FORTRAN_ENV intrinsic module missing
Summary: Fortran 2003: ISO_FORTRAN_ENV intrinsic module missing
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.1
: P2 enhancement
Target Milestone: 4.3.0
Assignee: Francois-Xavier Coudert
URL:
Keywords:
Depends on: 25707
Blocks: 20585
  Show dependency treegraph
 
Reported: 2005-07-18 13:46 UTC by tobias.burnus
Modified: 2006-11-19 21:30 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-10-22 07:45:25


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tobias.burnus 2005-07-18 13:46:36 UTC
http://j3-fortran.org/doc/standing/2003/007.pdf contains on page 376 ("360") in
section 13.8.2 the ISO_FORTRAN_ENV intrinsic module, which supplies some
constants for:
- CHARACTER_STORAGE_SIZE (e.g. integer, parameter :: CHARACTER_STORAGE_SIZE = 8)
- ERROR_UNIT (e.g. integer, parameter :: ERROR_UNIT = 0)
- FILE_STORAGE_SIZE (e.g. integer, parameter :: FILE_STORAGE_SIZE = 8)
- INPUT_UNIT (e.g. integer, parameter :: INPUT_UNIT = 5)
- IOSTAT_END (e.g. integer, parameter :: IOSTAT_END = -1)
- IOSTAT_EOR (e.g. integer, parameter :: IOSTAT_EOR = -2)
- NUMERIC_STROAGE_SIZE (e.g. integer, parameter :: Numeric_Storage_Size = 32)
- OUTPUT_UNIT (e.g. integer, parameter :: Output_Unit = 6)
Comment 1 kargl 2005-07-18 17:15:37 UTC
This should be fairly straight forward to implement.  The
question is where do we put the module and 8.o file.  Is
${prefix}/lib/modules a good enough place?  There is also
the possibility of ${prefix}/libexec/modules.

Comment 2 Andrew Pinski 2005-07-18 17:18:40 UTC
Confirmed.
Comment 3 tobias.burnus 2005-07-18 18:11:07 UTC
For completeness, the current link is:
  http://j3-fortran.org/doc/year/04/04-007.pdf
Comment 4 tobias.burnus 2006-04-20 16:02:23 UTC
(In reply to comment #1)
> This should be fairly straight forward to implement.  The
> question is where do we put the module and 8.o file.  Is
> ${prefix}/lib/modules a good enough place?  There is also
> the possibility of ${prefix}/libexec/modules.

I'm not sure whether putting it into an external module is the right way to do as this is an intrinsic module; in any case this .mod file has to be regarded as intrinsic (see below).

From "Fortran 95/2003 explained":
"Also like intrinsic procedures, it is possible for a program to use an intrinsic module and a user-defined module of the same name, though they cannot both be referenced from the same scoping unit. [...] for example"
  use, intrinsic :: iso_fortran_env
(and: use, non_intrinsic :: iso_fortran_env)
(For completeness: The other intrinsic modules of Fortran 2003 are: ieee_* and iso_c_binding.)
Comment 5 Francois-Xavier Coudert 2006-10-22 07:45:25 UTC
I don't think we want to have a real .mod file somewhere, but I know how I'll implement it internally. I'll do it.
Comment 6 Francois-Xavier Coudert 2006-11-19 21:30:51 UTC
Commited to mainline.