Activity log for bug #1643538

Date Who What changed Old value New value Message
2016-11-21 12:17:12 sobczyk bug added bug
2016-11-21 12:52:08 sobczyk attachment added test code https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1643538/+attachment/4780984/+files/test.cpp
2016-11-21 12:53:09 sobczyk description g++ > 5.1 introduced a regression Following code compiled with g++ -std=c++11 #include <memory> struct HelperArgs { std::shared_ptr<bool> dummy; }; static void freefunc(HelperArgs aa = {}) { }; // doesn't work //static void freefunc(HelperArgs aa = HelperArgs{}) { }; // works int main() { freefunc(); return 0; } creates: g++ -std=c++11 test.cpp /tmp/ccDj6FO4.o: In function `main': test.cpp:(.text+0xc7): undefined reference to `std::shared_ptr<bool>::shared_ptr()' collect2: error: ld returned 1 exit status all clang++ compile this code fine g++ > 5.1 introduced a regression Attached code compiled with g++ -std=c++11 test.cpp creates: /tmp/ccDj6FO4.o: In function `main': test.cpp:(.text+0xc7): undefined reference to `std::shared_ptr<bool>::shared_ptr()' collect2: error: ld returned 1 exit status all clang++ compilers compile this code fine