https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82480
Bug ID: 82480 Summary: KIND array returned by STAT too small for many values on CygWin platforms (and probably others) Product: gcc Version: 6.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: urbanjost at comcast dot net Target Milestone: --- Created attachment 42326 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42326&action=edit sample output showing bad values in output from STAT(3f) The GNU extension intrinsic STAT returns an array of INTEGER(KIND=4). On Cygwin platforms (and others) many of the values such as INODE values can be bigger than HUGE(0). A sample program that is basically the example from the STAT man page is attached with output on a simple text file on my system. Then that output is compared to output from stat(1) and ls(1) to show that several values such as the INODE and owner GID are too big to be returned in KIND=4 INTEGER values. The C descriptions for many of the values on my system, including the POSIX interface descriptions indicate many of the values being queried can be bigger than the largest value that can be returned by STAT. Shouldn't STAT be returning at least 64-bit integers?