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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-09-24
                 CC|                            |trippels at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |4.9.3, 5.2.0, 6.0

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Hmm,

markus@x4 tmp % cat compil.cpp
#include <initializer_list>

int main()
{
        int required = 1;
        std::initializer_list<int> needed;
        needed = {required};
        if (*begin(needed)!=1)
                __builtin_abort();
}

markus@x4 tmp % g++ -O2 -std=c++11 compil.cpp && ./a.out
[1]    24721 abort      ./a.out

Lifetime of std::initializer_list can be tricky, but I think the testcase above
is valid.

Reply via email to