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
          Reporter: patrick at motec dot
  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 {
        explicit foo(unsigned);

        unsigned v;

void bar(foo x = 0u)
        printf("%d\n", x.v);

int main()
        return 0;

Reply via email to