This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43310] -pedantic errors involving PARAMETERs and out of range result
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2010 22:26:49 -0000
- Subject: [Bug fortran/43310] -pedantic errors involving PARAMETERs and out of range result
- References: <bug-43310-18897@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from kargl at gcc dot gnu dot org 2010-03-17 22:26 -------
(In reply to comment #11)
> > Well, the number model is symmetric. See Fortran 2003 ...
>
> I agree, but it is a very pedantic view that should at least be mentioned in
> the manual.
You forgot to attach your patch.
> Now I think the implementation is not consistent:
>
> [macbook] f90/bug% cat > ishft_1.f90
> print *, ishft(1,31)
> end
> [macbook] f90/bug% gfc -Wall -pedantic ishft_1.f90
> [macbook] f90/bug% a.out
> -2147483648
gfc_simplify_ishft doesn't range check its result.
Patch welcomed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43310