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



             Bug #: 55804

           Summary: [4.7/4.8 regression] GCC omits required call to

                    constructor

    Classification: Unclassified

           Product: gcc

           Version: unknown

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: c++

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

        ReportedBy: ppluzhni...@google.com





Test case (courtesy creduce-2.0.1):



/// --- cut ---

template <typename> struct vector {

  vector() { }

};



typedef vector<int> Arrays[1];

class C

{

    vector<int> v_;

    void Foo(const Arrays &);

};

Arrays a;

/// --- cut ---





GCC-4.7 before r194286 (PR55032) was merged:



g++ -S pp.ii -o pp-good.s

c++filt < pp-good.s | grep call

    call    vector<int>::vector()

    call    __static_initialization_and_destruction_0(int, int)





Current trunk:



cat pp-bad.7765.s

    .file    "pp.ii"

    .globl    a

    .bss

    .type    a, @object

    .size    a, 1

a:

    .zero    1

    .ident    "GCC: (GNU) 4.8.0 20121222 (experimental)"

    .section    .note.GNU-stack,"",@progbits

Reply via email to