This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

C++ PATCH for libstdc++ test failure in C++17 mode


Jonathan recently noticed that 20_util/shared_ptr/cons/constexpr.cc
was failing in C++17 mode.  This was due to the copy elision changes
introducing TARGET_EXPR that wasn't there before, and
maybe_constant_init deciding that it wasn't sufficiently constant.  I
fixed that by looking through the TARGET_EXPR, but that broke
self-assign-test-1.C, because we were optimizing away the
self-assignment of foo and returning the incomplete CONSTRUCTOR that
we were in the process of building up.  I fixed that by making sure
that we don't return an incomplete CONSTRUCTOR as the final value of a
constant expression.

Tested x86_64-pc-linux-gnu, applying to trunk.

Attachment: unique.diff
Description: Text document


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