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

            Bug ID: 68607
           Summary: Internal compiler error with generic lambda and
                    constexpr
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: paulourio at gmail dot com
  Target Milestone: ---

The following C++14 file produces an internal compiler error.

int main() {
  constexpr int k = 0;

  auto f = [&](auto param) {
    if (param == k) {
    }
  };

  f(0);
  return 0;
}

icp.cpp: In instantiation of ‘main()::<lambda(auto:1)> [with auto:1 = int]’:
icp.cpp:10:6:   required from here
icp.cpp:2:5: internal compiler error: in tsubst_decl, at cp/pt.c:10836
 int main() {
     ^

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-5.2.0/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --enable-multilib --disable-werror
--enable-checking=release --with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 5.2.0 (GCC)

Reply via email to