Message ID | YkRkVtRrAUK63zxC@tucnak |
---|---|
State | New |
Headers | show |
Series | [committed] testsuite: Change pr80334.C testcase to dg-do compile [PR102772] | expand |
--- gcc/testsuite/g++.dg/torture/pr80334.C.jj 2020-01-12 11:54:37.268400509 +0100 +++ gcc/testsuite/g++.dg/torture/pr80334.C 2022-03-30 15:56:54.259507802 +0200 @@ -1,4 +1,8 @@ -// { dg-do run } +// This used to be dg-do run testcase, but it is invalid at runtime: +// trying to do a placement new of A which is 16-byte sized and aligned +// into a 16-byte buffer at offset 17 bytes from 16-byte aligned address +// is UB. +// { dg-do compile } struct A { alignas(16) char c; }; struct B { A unpacked; char d; } __attribute__((packed));