This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Test for C++20 p0858 - ConstexprIterator requirements.


On Mon, 10 Jun 2019 at 01:03, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>
> Hi Ed,
>
> >>> I had supplied the option for gnu++2a by hand and they passed.?? They
> >>> were not UNSUPPORTED.
> >>>
> >>> I just added the dg-options (at very top) and reran the testsuite
> >>> without fancy tricks (except for gnu++2a).
> >>>
> >>> I also took out the #if __cplusplus.?? I was just playing around and
> >>> discovered that these pass in C++17 if you comment out the C++20
> >>> constexpr algos.
> >>>
> >>> OK for trunk?
> >>
> >> OK for trunk.
> > Committed 272084.
>
> 272085 actually ;-)  Unfortunately, the new tests seem to FAIL (almost?)
> everywhere:
>
> +FAIL: 21_strings/basic_string_view/requirements/constexpr_iter.cc (test for excess errors)
>
> Excess errors:
> /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:33: error: call to non-'constexpr' function '_OI std::copy(_II, _II, _OI) [with _II = const char*; _OI = int*]'
> /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:41: error: 'constexpr char test()' called in a constant expression
>
> +FAIL: 23_containers/array/requirements/constexpr_iter.cc (test for excess errors)
>
> /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc:32: error: call to non-'constexpr' function '_OI std::copy(_II, _II, _OI) [with _II = const int*; _OI = int*]'
> /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/23_containers/array/requirements/constexpr_iter.cc:40: error: 'constexpr int test()' called in a constant expression
>
> I'm seeing those on i386-pc-solaris2.11 and sparc-sun-solaris2.11, and
> there are gcc-testresults reports on aarch64-unknown-linux-gnu,
> i686-pc-linux-gnu, powerpc64le-unknown-linux-gnu, and
> x86_64-pc-linux-gnu, among others.
>
> Please fix.

Indeed. std::copy isn't constexpr yet. I don't see how Ed's test run
can pass. We either need to put this on hold until enough of
<algorithm> is constexprified,
or we need to use loops in this test and test (constexpr) algorithms'
use of (constexpr) iterators separately later.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]