public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96627] New: gcc raises compile-time segmentation fault on <=> = default
@ 2020-08-15 15:38 poul250 at yandex dot ru
  2020-08-15 15:47 ` [Bug c++/96627] " poul250 at yandex dot ru
  2020-08-18 13:36 ` mpolacek at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: poul250 at yandex dot ru @ 2020-08-15 15:38 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96627
           Summary: gcc raises compile-time segmentation fault on <=> =
                    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 <iostream>

struct Float {
    float value;

    constexpr Float(float value) : value (value) {}

    constexpr bool operator == (Float other) const noexcept {
        return abs(value - other.value) < 0.5;
    }

    constexpr bool operator != (Float other) const noexcept {
        return !(*this == other);
    }

    constexpr bool operator <=> (const Float& other) const noexcept = default;
};

and I get this message from the compiler
<source>: In member function 'constexpr bool Float::operator<=>(const Float&)
const':

<source>:16:20: internal compiler error: in genericize_spaceship, at
cp/method.c:1053

   16 |     constexpr bool operator <=> (const Float& other) const noexcept =
default;

      |                    ^~~~~~~~

Please submit a full bug report,

with preprocessed source if appropriate.

See <https://gcc.gnu.org/bugs/> for instructions.


gcc -v output:

Using built-in specs.

COLLECT_GCC=/opt/compiler-explorer/gcc-snapshot/bin/g++

COLLECT_LTO_WRAPPER=/opt/compiler-explorer/gcc-trunk-20200815/bin/../libexec/gcc/x86_64-linux-gnu/11.0.0/lto-wrapper

Target: x86_64-linux-gnu

Configured with: ../gcc-trunk-20200815/configure
--prefix=/opt/compiler-explorer/gcc-build/staging --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu --disable-bootstrap
--enable-multiarch --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --enable-clocale=gnu --enable-languages=c,c++,fortran,ada,d
--enable-ld=yes --enable-gold=yes --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-linker-build-id --enable-lto
--enable-plugins --enable-threads=posix
--with-pkgversion=Compiler-Explorer-Build

Thread model: posix

Supported LTO compression algorithms: zlib

gcc version 11.0.0 20200814 (experimental) (Compiler-Explorer-Build) 

COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-g' '-o' './output.s' '-L.'
'-std=c++20' '-v' '-shared-libgcc' '-mtune=generic' '-march=x86-64' '-dumpdir'
'./output.s-'


/opt/compiler-explorer/gcc-trunk-20200815/bin/../libexec/gcc/x86_64-linux-gnu/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/11.0.0/
-D_GNU_SOURCE <source> -quiet -dumpdir ./output.s- -dumpbase example.cpp
-dumpbase-ext .cpp -mtune=generic -march=x86-64 -g -std=c++20 -version
-fdiagnostics-color=always -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=30 --param ggc-min-heapsize=4096

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/11.0.0/../../../../include/c++/11.0.0


/opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/x86_64-linux-gnu/11.0.0/../../../../include/c++/11.0.0/x86_64-linux-gnu


/opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/x86_64-linux-gnu/11.0.0/../../../../include/c++/11.0.0/backward


/opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/x86_64-linux-gnu/11.0.0/include


/opt/compiler-explorer/gcc-trunk-20200815/bin/../lib/gcc/x86_64-linux-gnu/11.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=30 --param ggc-min-heapsize=4096

Compiler executable checksum: a823caeff94dfb060f69c7d6a712edae

You can see this on godbolt https://godbolt.org/z/b6dfK8

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/96627] gcc raises compile-time segmentation fault on <=> = default
  2020-08-15 15:38 [Bug c++/96627] New: gcc raises compile-time segmentation fault on <=> = default poul250 at yandex dot ru
@ 2020-08-15 15:47 ` poul250 at yandex dot ru
  2020-08-18 13:36 ` mpolacek at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: poul250 at yandex dot ru @ 2020-08-15 15:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Pavel Kulis <poul250 at yandex dot ru> ---
compile options: --std=c++2a

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/96627] gcc raises compile-time segmentation fault on <=> = default
  2020-08-15 15:38 [Bug c++/96627] New: gcc raises compile-time segmentation fault on <=> = default poul250 at yandex dot ru
  2020-08-15 15:47 ` [Bug c++/96627] " poul250 at yandex dot ru
@ 2020-08-18 13:36 ` mpolacek at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-18 13:36 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mpolacek at gcc dot gnu.org
         Resolution|---                         |DUPLICATE

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Looks like a dup.

*** This bug has been marked as a duplicate of bug 94162 ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-18 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-15 15:38 [Bug c++/96627] New: gcc raises compile-time segmentation fault on <=> = default poul250 at yandex dot ru
2020-08-15 15:47 ` [Bug c++/96627] " poul250 at yandex dot ru
2020-08-18 13:36 ` mpolacek at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).