public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/57517] New: internal compiler error: in eliminate_temp_copies, at tree-predcom.c:1913
@ 2013-06-03 17:25 decker at envsci dot rutgers.edu
  2013-06-04 12:39 ` [Bug tree-optimization/57517] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: decker at envsci dot rutgers.edu @ 2013-06-03 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57517
           Summary: internal compiler error: in eliminate_temp_copies, at
                    tree-predcom.c:1913
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: decker at envsci dot rutgers.edu

The following code compiles at O2, but not O3.

~/test > gfortran481 -O3 -c module_diffusion_em.f90
module_diffusion_em.f90: In function ‘cal_helicity’:
module_diffusion_em.f90:1:0: internal compiler error: in eliminate_temp_copies,
at tree-predcom.c:1913
 SUBROUTINE cal_helicity (uh, ph, phb, ht, ims, ime, jms, jme, kms, kme,  &
 ^
0xc81b7a eliminate_temp_copies
    ../../gcc-4.8.1/gcc/tree-predcom.c:1913
0xc81b7a tree_predictive_commoning_loop
    ../../gcc-4.8.1/gcc/tree-predcom.c:2519
0xc82277 tree_predictive_commoning()
    ../../gcc-4.8.1/gcc/tree-predcom.c:2554
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

~/test > cat module_diffusion_em.f90
SUBROUTINE cal_helicity (uh, ph, phb, ht, ims, ime, jms, jme, kms, kme,  &
     its, ite, jts, jte, kts, kte)
  INTEGER, INTENT( IN ) :: ims, ime, jms, jme, kms, kme,  &
       its, ite, jts, jte, kts, kte
  REAL, DIMENSION( ims:ime , jms:jme ), INTENT( IN ) :: ht
  REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT( IN ) :: ph, phb
  REAL, DIMENSION( ims:ime, jms:jme ), INTENT( INOUT ) :: uh
  INTEGER :: i, j, k, ktf, i_start, i_end, j_start, j_end
  REAL :: zl, zu
  REAL, DIMENSION( its-2:ite+2, kts:kte, jts-2:jte+2 ) :: wavg, rvort
  real, parameter :: g = 9.81
  DO j = j_start, j_end
     DO k = kts, ktf
        DO i = i_start, i_end
           zu =  (( ph(i ,k+1,j ) + phb(i ,k+1,j ) ) / g - ht(i ,j ) ) + &
                (( ph(i-1,k+1,j ) + phb(i-1,k+1,j ) ) / g - ht(i-1,j ) ) + &
                (( ph(i ,k+1,j-1) + phb(i ,k+1,j-1) ) / g - ht(i ,j-1) )
           IF ( zl .GE. 2000. .AND. zu .LE. 5000. ) THEN
              IF ( wavg(i,k,j) .GT. 0. .AND. wavg(i,k+1,j) .GT. 0. ) THEN
                 uh(i,j) = uh(i,j) + ( wavg(i,k,j) * rvort(i,k,j) + &
                      wavg(i,k+1,j) * rvort(i,k+1,j) )  * ( zu - zl )
              ENDIF
           ENDIF
        END DO
     END DO
  END DO
END SUBROUTINE cal_helicity

~/test > gfortran481 -v
Using built-in specs.
COLLECT_GCC=/home/decker/local/gcc481/bin/gfortran481
COLLECT_LTO_WRAPPER=/home/decker/local/gcc481/libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.8.1/configure --prefix=/home/decker/local/gcc481
--program-suffix=481 --enable-languages=c,c++,fortran
--with-gmp=/home/decker/local --with-mpfr=/home/decker/local
--with-mpc=/home/decker/local --with-isl=/home/decker/local
--with-cloog=/home/decker/local
Thread model: posix
gcc version 4.8.1 (GCC)
>From gcc-bugs-return-423751-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 03 17:25:49 2013
Return-Path: <gcc-bugs-return-423751-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1882 invoked by alias); 3 Jun 2013 17:25:49 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 1831 invoked by uid 48); 3 Jun 2013 17:25:46 -0000
From: "jos at vandenoever dot info" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/57515] implement begin() and end() for fixed size arrays
Date: Mon, 03 Jun 2013 17:25:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 4.7.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: jos at vandenoever dot info
X-Bugzilla-Status: RESOLVED
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: resolution
Message-ID: <bug-57515-4-XAVSaoHpaC@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-57515-4@http.gcc.gnu.org/bugzilla/>
References: <bug-57515-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-06/txt/msg00130.txt.bz2
Content-length: 706

http://gcc.gnu.org/bugzilla/show_bug.cgi?idW515

jos at vandenoever dot info changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |WORKSFORME

--- Comment #3 from jos at vandenoever dot info ---
I've expanded the comment with #include and std::. It *does* compile now, so
the bug was invalid.

#include <algorithm>
#include <iostream>

int
main() {
    int some_list[]={ 1, 2, 3, 4, 5 };
    int total = 0;
    std::for_each(std::begin(some_list), std::end(some_list), [&total](int x) {
      total += x;
    });
    std::cout << total << std::endl;
    return 0;
}


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

end of thread, other threads:[~2014-03-18  8:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-03 17:25 [Bug tree-optimization/57517] New: internal compiler error: in eliminate_temp_copies, at tree-predcom.c:1913 decker at envsci dot rutgers.edu
2013-06-04 12:39 ` [Bug tree-optimization/57517] [4.7/4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2013-10-30 12:50 ` rguenth at gcc dot gnu.org
2013-11-18 15:04 ` rguenth at gcc dot gnu.org
2013-11-19  9:21 ` rguenth at gcc dot gnu.org
2013-11-19  9:23 ` rguenth at gcc dot gnu.org
2013-11-19  9:25 ` [Bug tree-optimization/57517] [4.7 " rguenth at gcc dot gnu.org
2014-03-18  8:47 ` rguenth at gcc dot gnu.org
2014-03-18  8:48 ` rguenth 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).