Source code attached:
---------------------------
/*
Thread model: win32
gcc version 4.8.2 (i686-win32-sjlj-rev3, Built by MinGW-W64 project)

E:\Desktop>g++ test.cpp -std=c++11
test.cpp: In function 'int main()':
test.cpp:16:34: internal compiler error: Segmentation fault
  foo({s.get_pair(), s.get_pair()});
                                  ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://sourceforge.net/projects/mingw-w64> for instructions.
*/

#include <utility>
#include <cstddef>

template<typename T>
struct S {
        std::pair<T *, std::size_t> get_pair() noexcept {
                return std::make_pair(nullptr, 0);
        }
};

static void foo(const std::pair<char *, std::size_t> (&a)[2]) noexcept {
}

int main(){
        S<char> s;
        foo({s.get_pair(), s.get_pair()});
}

                                
--------------
Best regards,
lh_mouse
2014-03-30


------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to