From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D835C3858C53; Wed, 1 Mar 2023 18:29:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D835C3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677695395; bh=1WAOJG+cmnZBJ+Y7NJvx2rEV3jcaZ+7Ue7XRCh1enq8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vjSrbfoMnD24jAOFKoAKrEb/l1TyFbbhKU1OItofZWkIjoOP6zY7AB/GfiFvUpEae O+3oh/bGUOf/byEAANOxyMRI2xCDWX43Ppnk7Ar+AbZ1W1BX5eX0X4S4M508FgghZy 3NcbKpQwLV7KrezJFvJ7N7EGbDr1uPAMy1tFys3w= From: "jvdelisle at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jvdelisle at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D92639 Jerry DeLisle changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvdelisle at gcc dot gnu.o= rg --- Comment #3 from Jerry DeLisle --- Please observe: program demonstrate integer :: i i =3D huge(i) print *, i i=3D -huge(i) print *, i end program $ gfc demonstrate.f90=20 $ ./a.out=20 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 si= gn of the value. How other compilers are storing the sign I can not speak to.=