Modify cxx17_aligned_new testcase to accommdate clang.

Explicitly use ordinary scalar delete and update the expecteds.
Otherwise g++ uses sized scalar delete whilse clang uses
ordinary scalar delete which causes a diff.
This commit is contained in:
Paul Floyd 2021-03-02 17:48:14 +01:00
parent b030c481dc
commit f9ee4517a0
3 changed files with 6 additions and 3 deletions

View File

@ -39,7 +39,10 @@ int main() {
// so new/aligned delete is not a mismatch
operator delete(oClass, std::align_val_t(64U));
oClass = new (std::nothrow) OrdinaryClass;
delete oClass;
//delete oClass;
// changed the above delete because GCC generates
// a sized delete (???) whilst clang generates an ordinary delete
operator delete(oClass);
oClass = new OrdinaryClass[5];
delete [] oClass;
oClass = new (std::nothrow) OrdinaryClass[5];

View File

@ -14,7 +14,7 @@ _ZdaPvSt11align_val_tRKSt9nothrow_t(0x........)
_Znwm(4) = 0x........
_ZdlPvSt11align_val_t(0x........)
_ZnwmRKSt9nothrow_t(4) = 0x........
_ZdlPvm(0x........)
_ZdlPv(0x........)
_Znam(20) = 0x........
_ZdaPv(0x........)
_ZnamRKSt9nothrow_t(20) = 0x........

View File

@ -14,7 +14,7 @@ _ZdaPvSt11align_val_tRKSt9nothrow_t(0x........)
_Znwj(4) = 0x........
_ZdlPvSt11align_val_t(0x........)
_ZnwjRKSt9nothrow_t(4) = 0x........
_ZdlPvj(0x........)
_ZdlPv(0x........)
_Znaj(20) = 0x........
_ZdaPv(0x........)
_ZnajRKSt9nothrow_t(20) = 0x........