This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/84506] INQUIRE(pos=) always sets pos=0 with -fdefault-integer-8
- From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Feb 2018 03:44:32 +0000
- Subject: [Bug fortran/84506] INQUIRE(pos=) always sets pos=0 with -fdefault-integer-8
- Auto-submitted: auto-generated
- References: <bug-84506-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84506
--- Comment #9 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Thu, Feb 22, 2018 at 03:30:01AM +0000, jvdelisle at gcc dot gnu.org wrote:
>
> if (D.3772 < -some-reasonable-value || D.3772 > 2147483647)
> {
> inquire_parm.3.common.unit = -3;
> }
> _gfortran_st_inquire (&inquire_parm.3);
>
> It could be something like -32768 simply because the check is to make sure the
> value used fits within kind=4 common.unit number.
>
Is the range check intended as a guard of inquiring on
stderr, stdin, and stdout?