From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3D8453857C4A; Sat, 15 Aug 2020 15:38:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D8453857C4A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1597505929; bh=6ix0mNQMCewQoL0ZHmCz+y7VEHajlSCT/DlSxeeAy3g=; h=From:To:Subject:Date:From; b=V5z7HZKoA6knlSlj19qv10phBKXQn+RX62J8CeKi6lY8+zbcXlilMBeoiBJLupPfd ZcxvcHPHGmJfx6QjzU/FKcfB5Tgqxay2bFunCpiiiGq8yI0S4rUaB1nFU5BuJGFrTy UrqFpfVqQMN1zHvKBEXCi8YMU5tbtlTSaccZhILk= From: "poul250 at yandex dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96627] New: gcc raises compile-time segmentation fault on <=> = default Date: Sat, 15 Aug 2020 15:38:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: poul250 at yandex dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2020 15:38:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96627 Bug ID: 96627 Summary: gcc raises compile-time segmentation fault on <=3D> =3D default Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: poul250 at yandex dot ru Target Milestone: --- Hi! I compile this code #include struct Float { float value; constexpr Float(float value) : value (value) {} constexpr bool operator =3D=3D (Float other) const noexcept { return abs(value - other.value) < 0.5; } constexpr bool operator !=3D (Float other) const noexcept { return !(*this =3D=3D other); } constexpr bool operator <=3D> (const Float& other) const noexcept =3D d= efault; }; and I get this message from the compiler : In member function 'constexpr bool Float::operator<=3D>(const Flo= at&) const': :16:20: internal compiler error: in genericize_spaceship, at cp/method.c:1053 16 | constexpr bool operator <=3D> (const Float& other) const noexce= pt =3D default; | ^~~~~~~~ Please submit a full bug report, with preprocessed source if appropriate. See for instructions. gcc -v output: Using built-in specs. COLLECT_GCC=3D/opt/compiler-explorer/gcc-snapshot/bin/g++ COLLECT_LTO_WRAPPER=3D/opt/compiler-explorer/gcc-trunk-20200815/bin/../libe= xec/gcc/x86_64-linux-gnu/11.0.0/lto-wrapper Target: x86_64-linux-gnu Configured with: ../gcc-trunk-20200815/configure --prefix=3D/opt/compiler-explorer/gcc-build/staging --build=3Dx86_64-linux-= gnu --host=3Dx86_64-linux-gnu --target=3Dx86_64-linux-gnu --disable-bootstrap --enable-multiarch --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --enable-multilib --enable-clocale=3Dgnu --enable-languages=3Dc,c++,fortran= ,ada,d --enable-ld=3Dyes --enable-gold=3Dyes --enable-libstdcxx-debug --enable-libstdcxx-time=3Dyes --enable-linker-build-id --enable-lto --enable-plugins --enable-threads=3Dposix --with-pkgversion=3DCompiler-Explorer-Build Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20200814 (experimental) (Compiler-Explorer-Build)=20 COLLECT_GCC_OPTIONS=3D'-fdiagnostics-color=3Dalways' '-g' '-o' './output.s'= '-L.' '-std=3Dc++20' '-v' '-shared-libgcc' '-mtune=3Dgeneric' '-march=3Dx86-64' '= -dumpdir' './output.s-' /opt/compiler-explorer/gcc-trunk-20200815/bin/../libexec/gcc/x86_64-linux-g= nu/11.0.0/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -iprefix /opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/x86_64-linux-gnu/1= 1.0.0/ -D_GNU_SOURCE -quiet -dumpdir ./output.s- -dumpbase example.cpp -dumpbase-ext .cpp -mtune=3Dgeneric -march=3Dx86-64 -g -std=3Dc++20 -version -fdiagnostics-color=3Dalways -o /tmp/ccjxATNn.s GNU C++20 (Compiler-Explorer-Build) version 11.0.0 20200814 (experimental) (x86_64-linux-gnu) compiled by GNU C version 7.5.0, GMP version 6.1.0, MPFR version 3.= 1.4, MPC version 1.0.3, isl version isl-0.18-GMP GGC heuristics: --param ggc-min-expand=3D30 --param ggc-min-heapsize=3D4096 ignoring nonexistent directory "/opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/x86_64-linux-gnu/= 11.0.0/../../../../x86_64-linux-gnu/include" ignoring duplicate directory "/opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/../../lib/gcc/x86= _64-linux-gnu/11.0.0/../../../../include/c++/11.0.0" ignoring duplicate directory "/opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/../../lib/gcc/x86= _64-linux-gnu/11.0.0/../../../../include/c++/11.0.0/x86_64-linux-gnu" ignoring duplicate directory "/opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/../../lib/gcc/x86= _64-linux-gnu/11.0.0/../../../../include/c++/11.0.0/backward" ignoring duplicate directory "/opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/../../lib/gcc/x86= _64-linux-gnu/11.0.0/include" ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" ignoring duplicate directory "/opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/../../lib/gcc/x86= _64-linux-gnu/11.0.0/include-fixed" ignoring nonexistent directory "/opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/../../lib/gcc/x86= _64-linux-gnu/11.0.0/../../../../x86_64-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/x86_64-linux-gnu/1= 1.0.0/../../../../include/c++/11.0.0 /opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/x86_64-linux-gnu/1= 1.0.0/../../../../include/c++/11.0.0/x86_64-linux-gnu /opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/x86_64-linux-gnu/1= 1.0.0/../../../../include/c++/11.0.0/backward /opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/x86_64-linux-gnu/1= 1.0.0/include /opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/x86_64-linux-gnu/1= 1.0.0/include-fixed /usr/local/include /opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/../../include /usr/include/x86_64-linux-gnu /usr/include End of search list. GNU C++20 (Compiler-Explorer-Build) version 11.0.0 20200814 (experimental) (x86_64-linux-gnu) compiled by GNU C version 7.5.0, GMP version 6.1.0, MPFR version 3.= 1.4, MPC version 1.0.3, isl version isl-0.18-GMP GGC heuristics: --param ggc-min-expand=3D30 --param ggc-min-heapsize=3D4096 Compiler executable checksum: a823caeff94dfb060f69c7d6a712edae You can see this on godbolt https://godbolt.org/z/b6dfK8=