This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/61245] New: ICE at in expand_ANNOTATE, at internal-fn.c:127 called from cfgexpand.c
- From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 20 May 2014 07:28:55 +0000
- Subject: [Bug tree-optimization/61245] New: ICE at in expand_ANNOTATE, at internal-fn.c:127 called from cfgexpand.c
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61245
Bug ID: 61245
Summary: ICE at in expand_ANNOTATE, at internal-fn.c:127 called
from cfgexpand.c
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: vincenzo.innocente at cern dot ch
apologize for not reducing (trivial reduction (bar below) works)
given
cat NaiveDod.cc
#include<array>
#include<vector>
#include<utility>
unsigned int N;
float * a, *b, *c;
void bar() {
#pragma GCC ivdep
for (auto i=0U; i<N; ++i)
a[i] = b[i]*c[i];
}
template<int N>
struct SoA {
using s_t = unsigned int;
using Ind = unsigned int;
auto size() const { return m_n;}
float & operator()(Ind i, Ind j) { return data[j][i];}
float const & operator()(Ind i, Ind j) const { return data[j][i];}
std::array<std::vector<float>,N> data;
s_t m_n=0;
};
template<int N>
void doT(SoA<N> & soa) {
#pragma GCC ivdep
for (auto i=0U; i<soa.size(); ++i)
soa(i,0) = soa(i,1)*soa(i,2);
}
void doIt(SoA<3> & soa) {
doT(soa);
}
produces
c++ -std=c++1y -Ofast -Wall -fopt-info-vec -fno-tree-slp-vectorize
-march=nehalem -S NaiveDod.cc
NaiveDod.cc:10:17: note: loop vectorized
NaiveDod.cc:10:17: note: loop peeled for vectorization to enhance alignment
NaiveDod.cc: In function 'void doIt(SoA<3>&)':
NaiveDod.cc:34:17: internal compiler error: in expand_ANNOTATE, at
internal-fn.c:127
for (auto i=0U; i<soa.size(); ++i)
^
0x9e9a97 expand_ANNOTATE
../../gcc-trunk/gcc/internal-fn.c:127
0x820a7a expand_call_stmt
../../gcc-trunk/gcc/cfgexpand.c:2236
0x820a7a expand_gimple_stmt_1
../../gcc-trunk/gcc/cfgexpand.c:3202
0x820a7a expand_gimple_stmt
../../gcc-trunk/gcc/cfgexpand.c:3354
0x821aee expand_gimple_basic_block
../../gcc-trunk/gcc/cfgexpand.c:5194
0x823746 execute
../../gcc-trunk/gcc/cfgexpand.c:5803
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.
c++ -v
Using built-in specs.
COLLECT_GCC=c++
COLLECT_LTO_WRAPPER=/afs/cern.ch/user/i/innocent/w4/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk//configure
--prefix=/afs/cern.ch/user/i/innocent/w4 --enable-languages=c,c++,lto,fortran
-enable-gold=yes --enable-lto --with-gmp-lib=/usr/local/lib64
--with-mpfr-lib=/usr/local/lib64 -with-mpc-lib=/usr/local/lib64
--enable-cloog-backend=isl --with-cloog=/usr/local
--with-ppl-lib=/usr/local/lib64 -enable-libitm -disable-multilib
Thread model: posix
gcc version 4.10.0 20140520 (experimental) [trunk revision 210630] (GCC)