public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [wwwdocs] changes.html - Fortran changes
@ 2017-01-25 14:53 Martin Liška
  2017-01-26 17:13 ` Gerald Pfeifer
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Liška @ 2017-01-25 14:53 UTC (permalink / raw)
  To: GCC Patches, Jan Hubicka

[-- Attachment #1: Type: text/plain, Size: 117 bytes --]

Hello.

Following patch documents DO loop changes which were done for upcoming GCC 7.1.

Thanks for feedback,
Martin

[-- Attachment #2: 0001-wwwdocs-fortra-do-loop.patch --]
[-- Type: text/x-patch, Size: 1192 bytes --]

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.
   </li>
 
+  <li>
+    DO loops with step equal to 1 or -1 generate faster code as they do not
+    have a loop preheader.  New warning <code>-Wundefined-do-loop</code>
+    warns when a loop iterates either to <code>HUGE(i)</code> (with step equal
+    to 1), or to <code>-HUGE(i)</code> (with step equal to -1). Apart from
+    that the invalid behaviour can be caught during run-time of a program with
+    <code>-fcheck=do</code>:
+    <blockquote><pre>
+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
+    </pre></blockquote>
+  </li>
+
 </ul>
 
 <!-- <h3 id="go">Go</h3> -->

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

* Re: [wwwdocs] changes.html - Fortran changes
  2017-01-25 14:53 [wwwdocs] changes.html - Fortran changes Martin Liška
@ 2017-01-26 17:13 ` Gerald Pfeifer
  2017-01-27 10:14   ` Martin Liška
  0 siblings, 1 reply; 3+ messages in thread
From: Gerald Pfeifer @ 2017-01-26 17:13 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Patches, Jan Hubicka

[-- Attachment #1: Type: text/plain, Size: 1242 bytes --]

Hi Martin,

On Wed, 25 Jan 2017, Martin Liška wrote:
> Following patch documents DO loop changes which were done for upcoming 
> GCC 7.1.

thanks for putting this together.

Index: htdocs/gcc-7/changes.html
===================================================================
+  <li>
+    DO loops with step equal to 1 or -1 generate faster code as they do not
+    have a loop preheader.  New warning <code>-Wundefined-do-loop</code>
+    warns when a loop iterates either to <code>HUGE(i)</code> (with step equal
+    to 1), or to <code>-HUGE(i)</code> (with step equal to -1). Apart from
+    that the invalid behaviour can be caught during run-time of a program with
+    <code>-fcheck=do</code>:

Can you makr up DO as <code>DO</code> since it is a keyword?

"A new warning..."

"behavior" (since we use American English, or it also would be
programme ;-).

"run time" (according to https://gcc.gnu.org/codingconventions.html )

+At line 8 of file /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/do_check_12.f90
+Fortran runtime error: Loop iterates infinitely
+    </pre></blockquote>

Here, can you shorten the filename to 
".../gcc/testsuite/gfortran.dg/do_check_12.f90" ?


This is fine with the changes above.

Thanks,
Gerald

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

* Re: [wwwdocs] changes.html - Fortran changes
  2017-01-26 17:13 ` Gerald Pfeifer
@ 2017-01-27 10:14   ` Martin Liška
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Liška @ 2017-01-27 10:14 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: GCC Patches, Jan Hubicka

On 01/26/2017 06:12 PM, Gerald Pfeifer wrote:
> Hi Martin,
> 
> On Wed, 25 Jan 2017, Martin Liška wrote:
>> Following patch documents DO loop changes which were done for upcoming 
>> GCC 7.1.
> 
> thanks for putting this together.
> 
> Index: htdocs/gcc-7/changes.html
> ===================================================================
> +  <li>
> +    DO loops with step equal to 1 or -1 generate faster code as they do not
> +    have a loop preheader.  New warning <code>-Wundefined-do-loop</code>
> +    warns when a loop iterates either to <code>HUGE(i)</code> (with step equal
> +    to 1), or to <code>-HUGE(i)</code> (with step equal to -1). Apart from
> +    that the invalid behaviour can be caught during run-time of a program with
> +    <code>-fcheck=do</code>:
> 
> Can you makr up DO as <code>DO</code> since it is a keyword?
> 
> "A new warning..."
> 
> "behavior" (since we use American English, or it also would be
> programme ;-).
> 
> "run time" (according to https://gcc.gnu.org/codingconventions.html )
> 
> +At line 8 of file /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/do_check_12.f90
> +Fortran runtime error: Loop iterates infinitely
> +    </pre></blockquote>
> 
> Here, can you shorten the filename to 
> ".../gcc/testsuite/gfortran.dg/do_check_12.f90" ?
> 
> 
> This is fine with the changes above.
> 
> Thanks,
> Gerald
> 

Hi Gerald.

Thanks for review, all notes are fixed.

Martin

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

end of thread, other threads:[~2017-01-27  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25 14:53 [wwwdocs] changes.html - Fortran changes Martin Liška
2017-01-26 17:13 ` Gerald Pfeifer
2017-01-27 10:14   ` Martin Liška

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).