public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Fortran Problems
@ 2018-03-21 18:36 Dominique d'Humières
  0 siblings, 0 replies; 2+ messages in thread
From: Dominique d'Humières @ 2018-03-21 18:36 UTC (permalink / raw)
  To: martintrucco8; +Cc: gfortran

Hi Martin,

> Hi! l installed Fortran on my computer and I wanted to do 32767+1 with Integer(2)
>  [to see that this exercise will be -32768] but Ubuntu said that I have an overflow error.

This has nothing to do with Ubuntu. Computing 32767+1 with Integer(2) is invalid in Fortran.

> PD: I don't know how can I disable the option '-fno-range-check' and internet couldn't help me

If nevertheless you still want to compute 32767+1 with Integer(2), you can do it (and get -32768) by enabling (not disabling)  the option '-fno-range-check’ .

Cheers,

Dominique


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Fortran Problems
@ 2018-03-21 18:20 Martin Trucco
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Trucco @ 2018-03-21 18:20 UTC (permalink / raw)
  To: fortran

Hi! l installed Fortran on my computer and I wanted to do 32767+1 with Integer(2) [to see that this exercise will be -32768] but Ubuntu said that I have an overflow error.

PD: I don't know how can I disable the option '-fno-range-check' and internet couldn't help me

THANKS!!!!!!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-21 18:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-21 18:36 Fortran Problems Dominique d'Humières
  -- strict thread matches above, loose matches on Subject: below --
2018-03-21 18:20 Martin Trucco

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).