From patchwork Sun Aug 24 12:37:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: VandeVondele Joost X-Patchwork-Id: 382480 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8B8461400AB for ; Sun, 24 Aug 2014 22:38:12 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=e8U +gdWoQU4Mbb9CXmCsOYi5kUfcGZDJMLkT2G4ANW8g7coI1XDOQtTjbZRifg+8cYX kH1481VDPRdcWzCaqpI1O/QQmdP8dclKalZwzatOOlSJ9GzZDiJQaGpJBTw8vEKO 254HDZzU23TNzR4clq15sUXOPYR2z14bXWYxlGkQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=qRYV4IH51 853pdiMZwOGEWuWUIw=; b=ie4dmnRR/OdpAYQmmSJJjzGLLj3bZ+sdM+ueYqbOJ +g4V/QdeS+d6WvvSNMJrRaFfB/NtnejW5+PPWYxeAsTrtN6Oq830DP5vgOuHYFQG ZzC4+MFB1MhQJ2ErkeBtnGf68DJDK/CgfJ2Axn+mHQaZRUIXhgByLep6r1ZaVQt7 NE= Received: (qmail 1649 invoked by alias); 24 Aug 2014 12:38:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 1619 invoked by uid 89); 24 Aug 2014 12:38:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: edge10.ethz.ch Received: from edge10.ethz.ch (HELO edge10.ethz.ch) (82.130.75.186) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 24 Aug 2014 12:37:59 +0000 Received: from CAS20.d.ethz.ch (172.31.51.110) by edge10.ethz.ch (82.130.75.186) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sun, 24 Aug 2014 14:37:49 +0200 Received: from MBX23.d.ethz.ch ([fe80::68b6:1e46:3e74:b8fd]) by CAS20.d.ethz.ch ([fe80::2cd8:4907:7776:c56d%10]) with mapi id 14.03.0195.001; Sun, 24 Aug 2014 14:37:55 +0200 From: "VandeVondele Joost" To: "gcc-patches@gcc.gnu.org" , "fortran@gcc.gnu.org" Subject: [PATCH] PR fortran/62245 fix INT docs. Date: Sun, 24 Aug 2014 12:37:55 +0000 Message-ID: <908103EDB4893A42920B21D3568BFD9312F37DC4@MBX23.d.ethz.ch> MIME-Version: 1.0 A doc change to refine wording for result value of int, avoiding the word range and using magnitude as does the standard. Mentions undefined behavior. 2014-08-24 Joost VandeVondele PR fortran/62245 * intrinsic.texi (INT): clarify result and undefined behavior. Index: intrinsic.texi =================================================================== --- intrinsic.texi (revision 214408) +++ intrinsic.texi (working copy) @@ -7371,8 +7371,10 @@ the following rules: If @var{A} is of type @code{INTEGER}, @code{INT(A) = A} @item (B) If @var{A} is of type @code{REAL} and @math{|A| < 1}, @code{INT(A)} equals @code{0}. -If @math{|A| \geq 1}, then @code{INT(A)} equals the largest integer that does not exceed -the range of @var{A} and whose sign is the same as the sign of @var{A}. +If @math{|A| \geq 1}, then @code{INT(A)} is the integer whose magnitude is the largest +integer that does not exceed the magnitude of @var{A} and whose sign is the same as +the sign of @var{A}. The result is undefined if it can not be represented as an +@code{INTEGER} of the given @code{KIND}. @item (C) If @var{A} is of type @code{COMPLEX}, rule B is applied to the real part of @var{A}. @end table