[Bug c++/69401] New: gcc 5.3.0 on microblaze: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1027

thomas.petazzoni@free-electrons.com gcc-bugzilla@gcc.gnu.org
Wed Jan 20 22:20:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69401

            Bug ID: 69401
           Summary: gcc 5.3.0 on microblaze: internal compiler error: in
                    gen_reg_rtx, at emit-rtl.c:1027
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thomas.petazzoni@free-electrons.com
  Target Milestone: ---

When building some C++ file from the flann library
(http://www.cs.ubc.ca/research/flann/) for Microblaze, gcc 5.3.0 fails with:

   internal compiler error: in gen_reg_rtx, at emit-rtl.c:1027

The problem was narrowed down to only happen with the combination of -O3 and
-fPIC. If one of these options is not used, the problem does not occur.

The attached flann.ii file is the preprocessed file, and the problem can be
reproduced by running:

$ microblaze-buildroot-linux-gnu-g++ -c -O3 -fPIC flann.ii

Here is the output of microblaze-buildroot-linux-gnu-g++ when building this
flann.ii file:

zino@mytesting:~/buildroot/output/build/flann-04b4a56533faf8c8228d011d05ba376038364b49/src/cpp$
 /home/zino/buildroot/output/host/usr/bin/microblaze-buildroot-linux-gnu-g++ -c
-O3 -v -fPIC flann.ii
Using built-in specs.
COLLECT_GCC=/home/zino/buildroot/output/host/usr/bin/microblaze-buildroot-linux-gnu-g++.br_real
Target: microblaze-buildroot-linux-gnu
Configured with: ./configure --prefix=/home/zino/buildroot/output/host/usr
--sysconfdir=/home/zino/buildroot/output/host/etc --enable-static
--target=microblaze-buildroot-linux-gnu
--with-sysroot=/home/zino/buildroot/output/host/usr/microblaze-buildroot-linux-gnu/sysroot
--disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib
--with-gmp=/home/zino/buildroot/output/host/usr
--with-mpfr=/home/zino/buildroot/output/host/usr --with-pkgversion='Buildroot
2016.02-git-00894-gaa112f2' --with-bugurl=http://bugs.buildroot.net/
--disable-libquadmath --enable-tls --disable-libmudflap --enable-threads
--with-mpc=/home/zino/buildroot/output/host/usr --without-isl --without-cloog
--disable-decimal-float --enable-languages=c,c++
--with-build-time-tools=/home/zino/buildroot/output/host/usr/microblaze-buildroot-linux-gnu/bin
--enable-shared --disable-libgomp
Thread model: posix
gcc version 5.3.0 (Buildroot 2016.02-git-00894-gaa112f2) 
COLLECT_GCC_OPTIONS='-c' '-O3' '-v' '-fPIC' '-shared-libgcc'

/home/zino/buildroot/output/host/usr/libexec/gcc/microblaze-buildroot-linux-gnu/5.3.0/cc1plus
-fpreprocessed flann.ii -quiet -dumpbase flann.ii -auxbase flann -O3 -version
-fPIC -o /tmp/cc6LK1Zx.s
GNU C++ (Buildroot 2016.02-git-00894-gaa112f2) version 5.3.0
(microblaze-buildroot-linux-gnu)
        compiled by GNU C version 5.3.1 20160101, GMP version 6.1.0, MPFR
version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (Buildroot 2016.02-git-00894-gaa112f2) version 5.3.0
(microblaze-buildroot-linux-gnu)
        compiled by GNU C version 5.3.1 20160101, GMP version 6.1.0, MPFR
version 3.1.3, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 72192880c32f68d631b343345080a169
In file included from
/home/zino/buildroot/output/build/flann-04b4a56533faf8c8228d011d05ba376038364b49/src/cpp/flann/algorithms/all_indices.h:35:0,
                 from
/home/zino/buildroot/output/build/flann-04b4a56533faf8c8228d011d05ba376038364b49/src/cpp/flann/flann.hpp:45,
                 from
/home/zino/buildroot/output/build/flann-04b4a56533faf8c8228d011d05ba376038364b49/src/cpp/flann/flann.h:476,
                 from
/home/zino/buildroot/output/build/flann-04b4a56533faf8c8228d011d05ba376038364b49/src/cpp/flann/flann.cpp:31:
/home/zino/buildroot/output/build/flann-04b4a56533faf8c8228d011d05ba376038364b49/src/cpp/flann/algorithms/nn_index.h:
In member function ‘int flann::NNIndex<Distance>::knnSearch(const
flann::Matrix<typename Distance::ElementType>&, flann::Matrix<unsigned int>&,
flann::Matrix<typename Distance::ResultType>&, size_t, const
flann::SearchParams&) const [with Distance = flann::KL_Divergence<double>;
typename Distance::ElementType = double; typename Distance::ResultType =
double; size_t = unsigned int]’:
/home/zino/buildroot/output/build/flann-04b4a56533faf8c8228d011d05ba376038364b49/src/cpp/flann/algorithms/nn_index.h:357:5:
internal compiler error: in gen_reg_rtx, at emit-rtl.c:1027
     }
     ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.buildroot.net/> for instructions.

This bug might be related to bug #68538 (same error message), but it happens on
Microblaze and not CRIS.


More information about the Gcc-bugs mailing list