http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55553



             Bug #: 55553

           Summary: Segmentation fault when calling vector::push_back with

                    an initialized list

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: c++

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: m...@godbolt.org





The following code:



---

#include <vector>



std::vector<int[2]> v;



void test() {

  v.push_back({1, 2});

}

---



Causes a segmentation fault on GCC 4.8.0 [gcc version 4.8.0 20120314

(experimental) [trunk revision 185382] (Ubuntu/Linaro 20120314-0ubuntu2)] when

compiled as: g++ -std=c++11 crash.cc



(For what it's worth I'm fairly sure the code is not actually valid).

Reply via email to