]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: constexpr trivial -fno-elide-ctors [PR104646]
authorJason Merrill <jason@redhat.com>
Thu, 14 Apr 2022 19:34:14 +0000 (15:34 -0400)
committerJason Merrill <jason@redhat.com>
Fri, 13 May 2022 17:39:30 +0000 (13:39 -0400)
commit7b4bd8dbd8d07e298528b0f033102ce8f693e739
treebf52f37661eff4b5cb94fa638aa1dd18d160bc8d
parent3daf541e8fe2dd0807a3dd49a9b8c065d7d46731
c++: constexpr trivial -fno-elide-ctors [PR104646]

The constexpr constructor checking code got confused by the expansion of a
trivial copy constructor; we don't need to do that checking for defaulted
ctors, anyway.

PR c++/104646

gcc/cp/ChangeLog:

* constexpr.c (maybe_save_constexpr_fundef): Don't do extra
checks for defaulted ctors.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/constexpr-fno-elide-ctors1.C: New test.
gcc/cp/constexpr.c
gcc/testsuite/g++.dg/cpp0x/constexpr-fno-elide-ctors1.C [new file with mode: 0644]