public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52893] New: [4.7/4.8 Regression] Moving functions out of implied DO loops
@ 2012-04-06 19:19 tkoenig at gcc dot gnu.org
  2012-04-06 19:20 ` [Bug fortran/52893] " tkoenig at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-04-06 19:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52893

             Bug #: 52893
           Summary: [4.7/4.8 Regression] Moving functions out of implied
                    DO loops
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: tkoenig@gcc.gnu.org
        ReportedBy: tkoenig@gcc.gnu.org


The following aborts with -ffrontend-optimize:

program test
  integer, parameter :: N = 4
  integer, parameter :: dp=kind(1.d0)
  real(kind=dp), parameter :: pi=4*atan(1._dp)
  real(kind=dp), parameter :: eps = 1.e-14_dp
  real(kind=dp) :: h1(0:N-1), h2(0:N-1)
  integer i

  i = 1
  h1 = [(cos(2*pi*mod(i*k,N)/N),k=0,N/2), &
       & (sin(2*pi*mod(i*k,N)/N),k=1,N/2-1)]
  h2 = (/ 1._dp, 0._dp, -1._dp, 1._dp /)
  if (any(abs(h1 - h2) > eps)) call abort
end program test


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

* [Bug fortran/52893] [4.7/4.8 Regression] Moving functions out of implied DO loops
  2012-04-06 19:19 [Bug fortran/52893] New: [4.7/4.8 Regression] Moving functions out of implied DO loops tkoenig at gcc dot gnu.org
@ 2012-04-06 19:20 ` tkoenig at gcc dot gnu.org
  2012-04-07 16:38 ` tkoenig at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-04-06 19:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52893

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-04-06
     Ever Confirmed|0                           |1


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

* [Bug fortran/52893] [4.7/4.8 Regression] Moving functions out of implied DO loops
  2012-04-06 19:19 [Bug fortran/52893] New: [4.7/4.8 Regression] Moving functions out of implied DO loops tkoenig at gcc dot gnu.org
  2012-04-06 19:20 ` [Bug fortran/52893] " tkoenig at gcc dot gnu.org
@ 2012-04-07 16:38 ` tkoenig at gcc dot gnu.org
  2012-04-07 19:29 ` [Bug fortran/52893] [4.7 " tkoenig at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-04-07 16:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52893

--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-04-07 16:38:19 UTC ---
Author: tkoenig
Date: Sat Apr  7 16:38:11 2012
New Revision: 186213

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186213
Log:
2012-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/52893
    * frontend-passes.c:  Keep track of wether we are in an implicit
    DO loop; do not do function elimination if we are.

2012-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/52893
    * gfortran.dg/function_optimize_11.f90:  New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/function_optimize_11.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/frontend-passes.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/52893] [4.7 Regression] Moving functions out of implied DO loops
  2012-04-06 19:19 [Bug fortran/52893] New: [4.7/4.8 Regression] Moving functions out of implied DO loops tkoenig at gcc dot gnu.org
  2012-04-06 19:20 ` [Bug fortran/52893] " tkoenig at gcc dot gnu.org
  2012-04-07 16:38 ` tkoenig at gcc dot gnu.org
@ 2012-04-07 19:29 ` tkoenig at gcc dot gnu.org
  2012-04-07 20:27 ` tkoenig at gcc dot gnu.org
  2012-04-07 20:27 ` tkoenig at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-04-07 19:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52893

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.1
            Summary|[4.7/4.8 Regression] Moving |[4.7 Regression] Moving
                   |functions out of implied DO |functions out of implied DO
                   |loops                       |loops


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

* [Bug fortran/52893] [4.7 Regression] Moving functions out of implied DO loops
  2012-04-06 19:19 [Bug fortran/52893] New: [4.7/4.8 Regression] Moving functions out of implied DO loops tkoenig at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-04-07 19:29 ` [Bug fortran/52893] [4.7 " tkoenig at gcc dot gnu.org
@ 2012-04-07 20:27 ` tkoenig at gcc dot gnu.org
  2012-04-07 20:27 ` tkoenig at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-04-07 20:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52893

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-04-07 20:27:35 UTC ---
Fixed, closing.


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

* [Bug fortran/52893] [4.7 Regression] Moving functions out of implied DO loops
  2012-04-06 19:19 [Bug fortran/52893] New: [4.7/4.8 Regression] Moving functions out of implied DO loops tkoenig at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-04-07 20:27 ` tkoenig at gcc dot gnu.org
@ 2012-04-07 20:27 ` tkoenig at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-04-07 20:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52893

--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-04-07 20:27:10 UTC ---
Author: tkoenig
Date: Sat Apr  7 20:27:02 2012
New Revision: 186215

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186215
Log:
2012-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/52893
    Backport from trunk
    * frontend-passes.c:  Keep track of wether we are in an implicit
    DO loop; do not do function elimination if we are.

2012-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/52893
    Backport from trunk
    * gfortran.dg/function_optimize_11.f90:  New test.


Added:
    branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/function_optimize_11.f90
Modified:
    branches/gcc-4_7-branch/gcc/fortran/ChangeLog
    branches/gcc-4_7-branch/gcc/fortran/frontend-passes.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2012-04-07 20:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-06 19:19 [Bug fortran/52893] New: [4.7/4.8 Regression] Moving functions out of implied DO loops tkoenig at gcc dot gnu.org
2012-04-06 19:20 ` [Bug fortran/52893] " tkoenig at gcc dot gnu.org
2012-04-07 16:38 ` tkoenig at gcc dot gnu.org
2012-04-07 19:29 ` [Bug fortran/52893] [4.7 " tkoenig at gcc dot gnu.org
2012-04-07 20:27 ` tkoenig at gcc dot gnu.org
2012-04-07 20:27 ` tkoenig at gcc dot gnu.org

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