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

            Bug ID: 84297
           Summary: ICE (mmap: Invalid argument) in
                    std::is_trivially_constructible
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: smw at gcc dot gnu.org
  Target Milestone: ---

I expected a diagnostic, but not this one.

    #include <type_traits>

    struct S { };

    std::is_trivially_constructible<S, int&()> boom;

Fed to any verison of GCC, I get something like the following.

In file included from <source>:1:
/opt/compiler-explorer/gcc-trunk-20180208/include/c++/8.0.1/type_traits: In
instantiation of 'struct std::is_trivially_constructible<S, int&()>':
<source>:5:48:   required from here
/opt/compiler-explorer/gcc-trunk-20180208/include/c++/8.0.1/type_traits:1150:12:
internal compiler error: tree check: did not expect class 'type', have 'type'
(function_type) in convert_from_reference, at cp/cvt.c:548
     struct is_trivially_constructible
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
mmap: Invalid argument
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1

Reply via email to