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

            Bug ID: 82099
           Summary: internal compiler error: in type_throw_all_p, at
                    cp/except.c:1186 when using a function pointer for
                    templated predicate
           Product: gcc
           Version: 7.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc at hazardy dot de
  Target Milestone: ---

Created attachment 42116
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42116&action=edit
The test file.

Trying to use a function pointer as predicate, e.g. in std::equal results in
the following error:

$ g++ test.cpp -std=c++1z -save-temps -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=E:/MinGW64/bin/../libexec/gcc/x86_64-w64-mingw32/7.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-7.1.0/configure --host=x86_64-w64-mingw32
--build=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64
--with-sysroot=/c/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64
--enable-shared --enable-static --disable-multilib
--enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes
--enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto
--enable-graphite --enable-checking=release --enable-fully-dynamic-string
--enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes
--disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap
--disable-rpath --disable-win32-registry --disable-nls --disable-werror
--disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona
--with-tune=core2 --with-libiconv --with-system-zlib
--with-gmp=/c/mingw710/prerequisites/x86_64-w64-mingw32-static
--with-mpfr=/c/mingw710/prerequisites/x86_64-w64-mingw32-static
--with-mpc=/c/mingw710/prerequisites/x86_64-w64-mingw32-static
--with-isl=/c/mingw710/prerequisites/x86_64-w64-mingw32-static
--with-pkgversion='x86_64-posix-seh-rev2, Built by MinGW-W64 project'
--with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe
-fno-ident -I/c/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64/opt/include
-I/c/mingw710/prerequisites/x86_64-zlib-static/include
-I/c/mingw710/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2
-pipe -fno-ident
-I/c/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64/opt/include
-I/c/mingw710/prerequisites/x86_64-zlib-static/include
-I/c/mingw710/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS='
-I/c/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64/opt/include
-I/c/mingw710/prerequisites/x86_64-zlib-static/include
-I/c/mingw710/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe
-fno-ident -L/c/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64/opt/lib
-L/c/mingw710/prerequisites/x86_64-zlib-static/lib
-L/c/mingw710/prerequisites/x86_64-w64-mingw32-static/lib '
Thread model: posix
gcc version 7.1.0 (x86_64-posix-seh-rev2, Built by MinGW-W64 project) 
COLLECT_GCC_OPTIONS='-std=c++1z' '-save-temps' '-v' '-shared-libgcc'
'-mtune=core2' '-march=nocona'
 E:/MinGW64/bin/../libexec/gcc/x86_64-w64-mingw32/7.1.0/cc1plus.exe -E -quiet
-v -iprefix E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/ -D_REENTRANT
test.cpp -mtune=core2 -march=nocona -std=c++1z -fpch-preprocess -o test.ii
ignoring duplicate directory
"E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++"
ignoring duplicate directory
"E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/x86_64-w64-mingw32"
ignoring duplicate directory
"E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/backward"
ignoring duplicate directory
"E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/include"
ignoring nonexistent directory
"C:/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../include"
ignoring duplicate directory
"E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/include-fixed"
ignoring duplicate directory
"E:/MinGW64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory
"C:/mingw710/x86_64-710-posix-seh-rt_v5-rev2/mingw64/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++

E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/x86_64-w64-mingw32
 E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/include/c++/backward
 E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/include
 E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/include-fixed

E:/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/include
End of search list.
COLLECT_GCC_OPTIONS='-std=c++1z' '-save-temps' '-v' '-shared-libgcc'
'-mtune=core2' '-march=nocona'
 E:/MinGW64/bin/../libexec/gcc/x86_64-w64-mingw32/7.1.0/cc1plus.exe
-fpreprocessed test.ii -quiet -dumpbase test.cpp -mtune=core2 -march=nocona
-auxbase test -std=c++1z -version -o test.s
GNU C++14 (x86_64-posix-seh-rev2, Built by MinGW-W64 project) version 7.1.0
(x86_64-w64-mingw32)
        compiled by GNU C version 7.1.0, GMP version 6.1.0, MPFR version 3.1.4,
MPC version 1.0.3, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++14 (x86_64-posix-seh-rev2, Built by MinGW-W64 project) version 7.1.0
(x86_64-w64-mingw32)
        compiled by GNU C version 7.1.0, GMP version 6.1.0, MPFR version 3.1.4,
MPC version 1.0.3, isl version isl-0.16.1-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: c3bcadf019df782eccf0dceb06ec4054
test.cpp: In function 'int main()':
test.cpp:14:69: internal compiler error: in type_throw_all_p, at
cp/except.c:1186
     return std::equal(a.begin(), a.end(), a.begin(), equal<int, int>); //Also
fails
                                                                     ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/mingw-w64> for instructions.

Tested on MinGW 7.1, and 7.1 and 7.2 on http://gcc.godbolt.org see
https://godbolt.org/g/M6FHp1

Reply via email to