public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jvdelisle at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/92639] Error: Integer too big for its kind at (1) Date: Wed, 01 Mar 2023 18:29:55 +0000 [thread overview] Message-ID: <bug-92639-4-ToG2lVGtG5@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-92639-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92639 Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvdelisle at gcc dot gnu.org --- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- Please observe: program demonstrate integer :: i i = huge(i) print *, i i= -huge(i) print *, i end program $ gfc demonstrate.f90 $ ./a.out 2147483647 -2147483647 This is by the fortran standard definition for a 32 bit integer. You cannot represent 2147483648 in 32 bits because you need bit 32 to represent the sign of the value. How other compilers are storing the sign I can not speak to.
next prev parent reply other threads:[~2023-03-01 18:29 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-23 17:11 [Bug fortran/92639] New: " gsocshubham at gmail dot com 2023-03-01 17:51 ` [Bug fortran/92639] " cessenat at gmail dot com 2023-03-01 18:29 ` jvdelisle at gcc dot gnu.org [this message] 2023-03-01 18:32 ` sgk at troutmask dot apl.washington.edu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-92639-4-ToG2lVGtG5@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).