[Bug c++/85097] ICE in double parameter pack

boldizsar.palotas at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Mar 27 15:21:00 GMT 2018


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

Boldizsár Palotás <boldizsar.palotas at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE in doub                 |ICE in double parameter
                   |                            |pack

--- Comment #1 from Boldizsár Palotás <boldizsar.palotas at gmail dot com> ---
// Code
template <typename A, typename B>
struct X {};

template <typename, typename... TOuter>
struct S
{
    template <typename... TInner>
    void function(X<TOuter, TInner>...)
    { }
};

void test_case() {
    S<void, int> s;
    s.function(X<int, short>());
}

// Reported error with -std=c++11 -Wall -Wextra -Wpedantic
<source>: In substitution of 'template<class ... TInner> void S<void,
int>::function<TInner ...>(X<TOuter, TInner>...) [with TInner = <missing>]':
<source>:14:31:   required from here
<source>:14:31: internal compiler error: tree check: accessed elt 2 of tree_vec
with 1 elts in unify, at cp/pt.c:21107
     s.function(X<int, short>());
                               ^
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


More information about the Gcc-bugs mailing list