Browse Source

Vk: add XFAIL for basically all NoInit tests on GCC 16.

Same as what happened with GCC 6.1 for math types already, version 16
with optimizations enabled is apparently able to "see through" the
NoInit constructor and discard whatever happened on that placement-new'd
memory before. Eh whatever, I just wanted to verify that *I* am not
accidentally zero-initing the thing.
next
Vladimír Vondruš 1 month ago
parent
commit
4d94920bce
  1. 24
      src/Magnum/Vk/Test/BufferTest.cpp
  2. 8
      src/Magnum/Vk/Test/CommandBufferTest.cpp
  3. 8
      src/Magnum/Vk/Test/CommandPoolTest.cpp
  4. 8
      src/Magnum/Vk/Test/DescriptorPoolTest.cpp
  5. 16
      src/Magnum/Vk/Test/DescriptorSetLayoutTest.cpp
  6. 8
      src/Magnum/Vk/Test/DeviceTest.cpp
  7. 8
      src/Magnum/Vk/Test/FenceTest.cpp
  8. 8
      src/Magnum/Vk/Test/FramebufferTest.cpp
  9. 48
      src/Magnum/Vk/Test/ImageTest.cpp
  10. 8
      src/Magnum/Vk/Test/ImageViewTest.cpp
  11. 8
      src/Magnum/Vk/Test/InstanceTest.cpp
  12. 16
      src/Magnum/Vk/Test/MemoryTest.cpp
  13. 8
      src/Magnum/Vk/Test/MeshLayoutTest.cpp
  14. 8
      src/Magnum/Vk/Test/PipelineLayoutTest.cpp
  15. 40
      src/Magnum/Vk/Test/PipelineTest.cpp
  16. 8
      src/Magnum/Vk/Test/QueueTest.cpp
  17. 64
      src/Magnum/Vk/Test/RenderPassTest.cpp
  18. 8
      src/Magnum/Vk/Test/SamplerTest.cpp
  19. 6
      src/Magnum/Vk/Test/ShaderTest.cpp

24
src/Magnum/Vk/Test/BufferTest.cpp

@ -118,7 +118,15 @@ void BufferTest::createInfoConstructNoInit() {
BufferCreateInfo info{NoInit}; BufferCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) BufferCreateInfo{NoInit}; new(&info) BufferCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<BufferCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<BufferCreateInfo, NoInitT>::value);
@ -172,7 +180,15 @@ void BufferTest::bufferCopyConstructNoInit() {
BufferCopy copy{NoInit}; BufferCopy copy{NoInit};
copy->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; copy->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&copy) BufferCopy{NoInit}; new(&copy) BufferCopy{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(copy->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(copy->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<BufferCopy, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<BufferCopy, NoInitT>::value);
@ -238,7 +254,15 @@ void BufferTest::copyBufferInfoConstructNoInit() {
CopyBufferInfo info{NoInit}; CopyBufferInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) CopyBufferInfo{NoInit}; new(&info) CopyBufferInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<CopyBufferInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<CopyBufferInfo, NoInitT>::value);

8
src/Magnum/Vk/Test/CommandBufferTest.cpp

@ -60,7 +60,15 @@ void CommandBufferTest::beginInfoConstructNoInit() {
CommandBufferBeginInfo info{NoInit}; CommandBufferBeginInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) CommandBufferBeginInfo{NoInit}; new(&info) CommandBufferBeginInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<CommandBufferBeginInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<CommandBufferBeginInfo, NoInitT>::value);

8
src/Magnum/Vk/Test/CommandPoolTest.cpp

@ -61,7 +61,15 @@ void CommandPoolTest::createInfoConstructNoInit() {
CommandPoolCreateInfo info{NoInit}; CommandPoolCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) CommandPoolCreateInfo{NoInit}; new(&info) CommandPoolCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<CommandPoolCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<CommandPoolCreateInfo, NoInitT>::value);

8
src/Magnum/Vk/Test/DescriptorPoolTest.cpp

@ -112,7 +112,15 @@ void DescriptorPoolTest::createInfoConstructNoInit() {
DescriptorPoolCreateInfo info{NoInit}; DescriptorPoolCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) DescriptorPoolCreateInfo{NoInit}; new(&info) DescriptorPoolCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<DescriptorPoolCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<DescriptorPoolCreateInfo, NoInitT>::value);

16
src/Magnum/Vk/Test/DescriptorSetLayoutTest.cpp

@ -130,7 +130,15 @@ void DescriptorSetLayoutTest::bindingConstructNoInit() {
DescriptorSetLayoutBinding info{NoInit}; DescriptorSetLayoutBinding info{NoInit};
info->pImmutableSamplers = &a; info->pImmutableSamplers = &a;
new(&info) DescriptorSetLayoutBinding{NoInit}; new(&info) DescriptorSetLayoutBinding{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->pImmutableSamplers, &a); CORRADE_COMPARE(info->pImmutableSamplers, &a);
}
CORRADE_VERIFY(std::is_nothrow_constructible<DescriptorSetLayoutBinding, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<DescriptorSetLayoutBinding, NoInitT>::value);
@ -257,7 +265,15 @@ void DescriptorSetLayoutTest::createInfoConstructNoInit() {
DescriptorSetLayoutCreateInfo info{NoInit}; DescriptorSetLayoutCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) DescriptorSetLayoutCreateInfo{NoInit}; new(&info) DescriptorSetLayoutCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<DescriptorSetLayoutCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<DescriptorSetLayoutCreateInfo, NoInitT>::value);

8
src/Magnum/Vk/Test/DeviceTest.cpp

@ -55,7 +55,15 @@ void DeviceTest::createInfoConstructNoInit() {
DeviceCreateInfo info{NoInit}; DeviceCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) DeviceCreateInfo{NoInit}; new(&info) DeviceCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<DeviceCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<DeviceCreateInfo, NoInitT>::value);

8
src/Magnum/Vk/Test/FenceTest.cpp

@ -60,7 +60,15 @@ void FenceTest::createInfoConstructNoInit() {
FenceCreateInfo info{NoInit}; FenceCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) FenceCreateInfo{NoInit}; new(&info) FenceCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<FenceCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<FenceCreateInfo, NoInitT>::value);

8
src/Magnum/Vk/Test/FramebufferTest.cpp

@ -111,7 +111,15 @@ void FramebufferTest::createInfoConstructNoInit() {
FramebufferCreateInfo info{NoInit}; FramebufferCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) FramebufferCreateInfo{NoInit}; new(&info) FramebufferCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<FramebufferCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<FramebufferCreateInfo, NoInitT>::value);

48
src/Magnum/Vk/Test/ImageTest.cpp

@ -325,7 +325,15 @@ void ImageTest::createInfoConstructNoInit() {
ImageCreateInfo info{NoInit}; ImageCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) ImageCreateInfo{NoInit}; new(&info) ImageCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<ImageCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<ImageCreateInfo, NoInitT>::value);
@ -408,7 +416,15 @@ void ImageTest::imageCopyConstructNoInit() {
ImageCopy copy{NoInit}; ImageCopy copy{NoInit};
copy->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; copy->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&copy) ImageCopy{NoInit}; new(&copy) ImageCopy{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(copy->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(copy->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<ImageCopy, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<ImageCopy, NoInitT>::value);
@ -504,7 +520,15 @@ void ImageTest::copyImageInfoConstructNoInit() {
CopyImageInfo info{NoInit}; CopyImageInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) CopyImageInfo{NoInit}; new(&info) CopyImageInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<CopyImageInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<CopyImageInfo, NoInitT>::value);
@ -650,7 +674,15 @@ void ImageTest::bufferImageCopyConstructNoInit() {
BufferImageCopy copy{NoInit}; BufferImageCopy copy{NoInit};
copy->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; copy->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&copy) BufferImageCopy{NoInit}; new(&copy) BufferImageCopy{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(copy->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(copy->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<BufferImageCopy, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<BufferImageCopy, NoInitT>::value);
@ -738,7 +770,15 @@ void ImageTest::copyBufferToImageInfoConstructNoInit() {
CopyBufferToImageInfo info{NoInit}; CopyBufferToImageInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) CopyBufferToImageInfo{NoInit}; new(&info) CopyBufferToImageInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<CopyBufferToImageInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<CopyBufferToImageInfo, NoInitT>::value);
@ -793,7 +833,15 @@ void ImageTest::copyImageToBufferInfoConstructNoInit() {
CopyImageToBufferInfo info{NoInit}; CopyImageToBufferInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) CopyImageToBufferInfo{NoInit}; new(&info) CopyImageToBufferInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<CopyImageToBufferInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<CopyImageToBufferInfo, NoInitT>::value);

8
src/Magnum/Vk/Test/ImageViewTest.cpp

@ -403,7 +403,15 @@ void ImageViewTest::createInfoConstructNoInit() {
ImageViewCreateInfo info{NoInit}; ImageViewCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) ImageViewCreateInfo{NoInit}; new(&info) ImageViewCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<ImageViewCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<ImageViewCreateInfo, NoInitT>::value);

8
src/Magnum/Vk/Test/InstanceTest.cpp

@ -56,7 +56,15 @@ void InstanceTest::createInfoConstructNoInit() {
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) InstanceCreateInfo{NoInit}; new(&info) InstanceCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<InstanceCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<InstanceCreateInfo, NoInitT>::value);

16
src/Magnum/Vk/Test/MemoryTest.cpp

@ -79,7 +79,15 @@ void MemoryTest::requirementsConstructNoInit() {
MemoryRequirements requirements{NoInit}; MemoryRequirements requirements{NoInit};
requirements->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; requirements->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&requirements) MemoryRequirements{NoInit}; new(&requirements) MemoryRequirements{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(requirements->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(requirements->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<MemoryRequirements, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<MemoryRequirements, NoInitT>::value);
@ -133,7 +141,15 @@ void MemoryTest::allocateInfoConstructNoInit() {
MemoryAllocateInfo info{NoInit}; MemoryAllocateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) MemoryAllocateInfo{NoInit}; new(&info) MemoryAllocateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<MemoryAllocateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<MemoryAllocateInfo, NoInitT>::value);

8
src/Magnum/Vk/Test/MeshLayoutTest.cpp

@ -198,8 +198,16 @@ void MeshLayoutTest::constructNoInit() {
layout.vkPipelineVertexInputStateCreateInfo().sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; layout.vkPipelineVertexInputStateCreateInfo().sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
layout.vkPipelineInputAssemblyStateCreateInfo().sType = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES; layout.vkPipelineInputAssemblyStateCreateInfo().sType = VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES;
new(&layout) MeshLayout{NoInit}; new(&layout) MeshLayout{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(layout.vkPipelineVertexInputStateCreateInfo().sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(layout.vkPipelineVertexInputStateCreateInfo().sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
CORRADE_COMPARE(layout.vkPipelineInputAssemblyStateCreateInfo().sType, VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES); CORRADE_COMPARE(layout.vkPipelineInputAssemblyStateCreateInfo().sType, VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES);
}
CORRADE_VERIFY(std::is_nothrow_constructible<MeshLayout, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<MeshLayout, NoInitT>::value);

8
src/Magnum/Vk/Test/PipelineLayoutTest.cpp

@ -82,7 +82,15 @@ void PipelineLayoutTest::createInfoConstructNoInit() {
PipelineLayoutCreateInfo info{NoInit}; PipelineLayoutCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) PipelineLayoutCreateInfo{NoInit}; new(&info) PipelineLayoutCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<PipelineLayoutCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<PipelineLayoutCreateInfo, NoInitT>::value);

40
src/Magnum/Vk/Test/PipelineTest.cpp

@ -223,7 +223,15 @@ void PipelineTest::rasterizationCreateInfoConstructNoInit() {
RasterizationPipelineCreateInfo info{NoInit}; RasterizationPipelineCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) RasterizationPipelineCreateInfo{NoInit}; new(&info) RasterizationPipelineCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<RasterizationPipelineCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<RasterizationPipelineCreateInfo, NoInitT>::value);
@ -580,7 +588,15 @@ void PipelineTest::computeCreateInfoConstructNoInit() {
ComputePipelineCreateInfo info{NoInit}; ComputePipelineCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) ComputePipelineCreateInfo{NoInit}; new(&info) ComputePipelineCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<ComputePipelineCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<ComputePipelineCreateInfo, NoInitT>::value);
@ -621,7 +637,15 @@ void PipelineTest::memoryBarrierConstructNoInit() {
MemoryBarrier barrier{NoInit}; MemoryBarrier barrier{NoInit};
barrier->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; barrier->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&barrier) MemoryBarrier{NoInit}; new(&barrier) MemoryBarrier{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(barrier->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(barrier->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<MemoryBarrier, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<MemoryBarrier, NoInitT>::value);
@ -652,7 +676,15 @@ void PipelineTest::bufferMemoryBarrierConstructNoInit() {
BufferMemoryBarrier barrier{NoInit}; BufferMemoryBarrier barrier{NoInit};
barrier->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; barrier->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&barrier) BufferMemoryBarrier{NoInit}; new(&barrier) BufferMemoryBarrier{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(barrier->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(barrier->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<BufferMemoryBarrier, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<BufferMemoryBarrier, NoInitT>::value);
@ -710,7 +742,15 @@ void PipelineTest::imageMemoryBarrierConstructNoInit() {
ImageMemoryBarrier barrier{NoInit}; ImageMemoryBarrier barrier{NoInit};
barrier->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; barrier->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&barrier) ImageMemoryBarrier{NoInit}; new(&barrier) ImageMemoryBarrier{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(barrier->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(barrier->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<ImageMemoryBarrier, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<ImageMemoryBarrier, NoInitT>::value);

8
src/Magnum/Vk/Test/QueueTest.cpp

@ -119,7 +119,15 @@ void QueueTest::submitInfoConstructNoInit() {
SubmitInfo info{NoInit}; SubmitInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) SubmitInfo{NoInit}; new(&info) SubmitInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<SubmitInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<SubmitInfo, NoInitT>::value);

64
src/Magnum/Vk/Test/RenderPassTest.cpp

@ -293,7 +293,15 @@ void RenderPassTest::attachmentDescriptionConstructNoInit() {
AttachmentDescription description{NoInit}; AttachmentDescription description{NoInit};
description->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; description->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&description) AttachmentDescription{NoInit}; new(&description) AttachmentDescription{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(description->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(description->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<AttachmentDescription, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<AttachmentDescription, NoInitT>::value);
@ -376,7 +384,15 @@ void RenderPassTest::attachmentReferenceConstructNoInit() {
AttachmentReference reference{NoInit}; AttachmentReference reference{NoInit};
reference->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; reference->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&reference) AttachmentReference{NoInit}; new(&reference) AttachmentReference{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(reference->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(reference->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<AttachmentReference, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<AttachmentReference, NoInitT>::value);
@ -436,7 +452,15 @@ void RenderPassTest::subpassDescriptionConstructNoInit() {
SubpassDescription description{NoInit}; SubpassDescription description{NoInit};
description->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; description->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&description) SubpassDescription{NoInit}; new(&description) SubpassDescription{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(description->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(description->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<SubpassDescription, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<SubpassDescription, NoInitT>::value);
@ -784,7 +808,15 @@ void RenderPassTest::subpassDependencyConstructNoInit() {
SubpassDependency dependency{NoInit}; SubpassDependency dependency{NoInit};
dependency->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; dependency->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&dependency) SubpassDependency{NoInit}; new(&dependency) SubpassDependency{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(dependency->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(dependency->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<SubpassDependency, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<SubpassDependency, NoInitT>::value);
@ -863,7 +895,15 @@ void RenderPassTest::createInfoConstructNoInit() {
RenderPassCreateInfo info{NoInit}; RenderPassCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) RenderPassCreateInfo{NoInit}; new(&info) RenderPassCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<RenderPassCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<RenderPassCreateInfo, NoInitT>::value);
@ -1163,7 +1203,15 @@ void RenderPassTest::beginInfoConstructNoInit() {
RenderPassBeginInfo info{NoInit}; RenderPassBeginInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) RenderPassBeginInfo{NoInit}; new(&info) RenderPassBeginInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<RenderPassBeginInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<RenderPassBeginInfo, NoInitT>::value);
@ -1233,7 +1281,15 @@ void RenderPassTest::subpassBeginInfoConstructNoInit() {
SubpassBeginInfo info{NoInit}; SubpassBeginInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) SubpassBeginInfo{NoInit}; new(&info) SubpassBeginInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<SubpassBeginInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<SubpassBeginInfo, NoInitT>::value);
@ -1258,7 +1314,15 @@ void RenderPassTest::subpassEndInfoConstructNoInit() {
SubpassEndInfo info{NoInit}; SubpassEndInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) SubpassEndInfo{NoInit}; new(&info) SubpassEndInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
}
CORRADE_VERIFY(std::is_nothrow_constructible<SubpassEndInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<SubpassEndInfo, NoInitT>::value);

8
src/Magnum/Vk/Test/SamplerTest.cpp

@ -190,7 +190,15 @@ void SamplerTest::createInfoConstructNoInit() {
SamplerCreateInfo info{NoInit}; SamplerCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; info->sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
new(&info) SamplerCreateInfo{NoInit}; new(&info) SamplerCreateInfo{NoInit};
{
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO);
}
CORRADE_VERIFY(std::is_nothrow_constructible<SamplerCreateInfo, NoInitT>::value); CORRADE_VERIFY(std::is_nothrow_constructible<SamplerCreateInfo, NoInitT>::value);

6
src/Magnum/Vk/Test/ShaderTest.cpp

@ -214,6 +214,12 @@ void ShaderTest::createInfoConstructNoInit() {
ShaderCreateInfo info{NoInit}; ShaderCreateInfo info{NoInit};
info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2; info->sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
new(&info) ShaderCreateInfo{NoInit}; new(&info) ShaderCreateInfo{NoInit};
/* Explicitly check we're not on Clang because certain Clang-based IDEs
inherit __GNUC__ if GCC is used instead of leaving it at 4 like
Clang itself does */
#if defined(CORRADE_TARGET_GCC) && !defined(CORRADE_TARGET_CLANG) && __GNUC__ >= 16 && __OPTIMIZE__
CORRADE_EXPECT_FAIL("GCC 16+ misoptimizes and overwrites the value.");
#endif
CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); CORRADE_COMPARE(info->sType, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2);
} }

Loading…
Cancel
Save