https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78032
Bug ID: 78032 Summary: Incorrect code generated Product: gcc Version: 6.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: patrick at motec dot com.au Target Milestone: --- The following test case generates an invalid program using GCC 6.2.1 20160830: The call to bar is eliminated and the resultant program does nothing. #include <cstdio> struct foo { foo(double); foo(float); explicit foo(unsigned); unsigned v; }; void bar(foo x = 0u) { printf("%d\n", x.v); } int main() { bar(); return 0; }