NCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tuwwcn at gmail dot com
Target Milestone: ---
This code is PASSED by gcc 5.3.0, but REJECTED by 6.1.0.(all using -
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70845
--- Comment #2 from Wei-Wei Tu ---
(In reply to Jonathan Wakely from comment #1)
> Complete testcase (would it really have hurt to include the headers to make
> the testcase valid?)
>
> #include
> #include
> #include
>
> struct Test : public
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70845
--- Comment #4 from Wei-Wei Tu ---
(In reply to Jonathan Wakely from comment #3)
> (In reply to Wei-Wei Tu from comment #2)
> > This is the test case
>
> Yes, I know, I already added it in comment 1 :-)
>
> Preprocessed source from gcc-5 fails,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70845
--- Comment #8 from Wei-Wei Tu ---
Would this bug be fixed in gcc 6.1.1 or in later version?
iority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tuwwcn at gmail dot com
Target Milestone: ---
The below code is rejected by GCC 6.1.0(similar bug,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70845), 6.3.0, 6.4.0, and 7.1.0,
but accepted by GCC 5.4.0.
I
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81527
--- Comment #1 from Wei-Wei Tu ---
Some additional information:
The above code is REJECTED by GCC 6.2.0 too.
But the below code is PASSED by GCC 6.1.0, 6.3.0, 6.4.0, 7.1.0. The only
difference is explicitly casting p's type to its own type.
//
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81527
--- Comment #2 from Wei-Wei Tu ---
> The above code is REJECTED by GCC 6.2.0 too.
==> Sorry for the mistake, The above code is ACCEPTED by GCC 6.2.0 too.
(In reply to Wei-Wei Tu from comment #1)
> Some additional information:
>
> The above code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81527
--- Comment #4 from Wei-Wei Tu ---
(In reply to Jonathan Wakely from comment #3)
> I don't think the code is valid, copy/move constructors are not inherited.
> See PR 69853 for a similar bug report.
>
> *** This bug has been marked as a duplicat