From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52673 invoked by alias); 25 Jan 2017 14:51:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 52645 invoked by uid 89); 25 Jan 2017 14:51:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=HUGE, Hx-languages-length:1307, 1.40, documents X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 Jan 2017 14:51:54 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B6A42ACED; Wed, 25 Jan 2017 14:51:51 +0000 (UTC) To: GCC Patches , Jan Hubicka From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [wwwdocs] changes.html - Fortran changes Message-ID: <33fb1de6-5a46-af5d-fe80-338e66684c83@suse.cz> Date: Wed, 25 Jan 2017 14:53:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------3B520AE79A0AF2056FA30D29" X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg01965.txt.bz2 This is a multi-part message in MIME format. --------------3B520AE79A0AF2056FA30D29 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 117 Hello. Following patch documents DO loop changes which were done for upcoming GCC 7.1. Thanks for feedback, Martin --------------3B520AE79A0AF2056FA30D29 Content-Type: text/x-patch; name="0001-wwwdocs-fortra-do-loop.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-wwwdocs-fortra-do-loop.patch" Content-length: 1192 Index: htdocs/gcc-7/changes.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-7/changes.html,v retrieving revision 1.40 diff --unified -r1.40 changes.html --- htdocs/gcc-7/changes.html 25 Jan 2017 10:10:56 -0000 1.40 +++ htdocs/gcc-7/changes.html 25 Jan 2017 13:09:28 -0000 @@ -362,6 +362,27 @@ derived-type variables. +
  • + DO loops with step equal to 1 or -1 generate faster code as they do not + have a loop preheader. New warning -Wundefined-do-loop + warns when a loop iterates either to HUGE(i) (with step equal + to 1), or to -HUGE(i) (with step equal to -1). Apart from + that the invalid behaviour can be caught during run-time of a program with + -fcheck=do: +
    +program test
    +  implicit none
    +  integer(1) :: i
    +  do i = -HUGE(i)+10, -HUGE(i)-1, -1
    +    print *, i
    +  end do
    +end program test
    +
    +At line 8 of file /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/do_check_12.f90
    +Fortran runtime error: Loop iterates infinitely
    +    
    +
  • + --------------3B520AE79A0AF2056FA30D29--