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

            Bug ID: 84698
           Summary: ICE when using noexcept(noexcept()) declaration on
                    global friend function of template class
           Product: gcc
           Version: 7.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nyronium at genthree dot io
  Target Milestone: ---

Created attachment 43558
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43558&action=edit
minimal code example triggering the bug

* Exact gcc version:

Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/7.3.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-7.3.0/work/gcc-7.3.0/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/7.3.0
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.3.0
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.3.0/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/7.3.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/7.3.0/include/g++-v7
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/7.3.0/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 7.3.0 p1.0' --disable-esp --enable-libstdcxx-time
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64
--disable-altivec --disable-fixed-point --enable-targets=all --disable-libgcj
--enable-libgomp --disable-libmudflap --disable-libssp --disable-libcilkrts
--disable-libmpx --enable-vtable-verify --enable-libvtv --enable-lto
--without-isl --enable-libsanitizer --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.3.0 (Gentoo 7.3.0 p1.0) 

* Command line triggering the bug:

g++ ice_noexcept.cpp

* Output of g++ ice_noexcept.cpp:

ice_noexcept.cpp: In instantiation of ‘template<class ... Args> void
swap(X<Args ...>&, X<Args ...>&)’:
ice_noexcept.cpp:7:14:   required from ‘struct X<int, int>’
ice_noexcept.cpp:15:14:   required from here
ice_noexcept.cpp:7:14: internal compiler error: in push_access_scope, at
cp/pt.c:228
  friend void swap(X<Args...>& a, X<Args...>& b) noexcept(noexcept(a.swap(b)));
              ^~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.


* Test with clang++ -std=c++17: accepts the code.

Reply via email to