@@ -1214,7 +1214,8 @@ expand_stack_vars (bool (*pred) (size_t), class stack_vars_data *data)
{
if (data->asan_vec.is_empty ())
{
- align_frame_offset (ASAN_RED_ZONE_SIZE);
+ align_frame_offset (MAX (BIGGEST_ALIGNMENT / BITS_PER_UNIT,
+ ASAN_RED_ZONE_SIZE));
prev_offset = frame_offset.to_constant ();
}
prev_offset = align_base (prev_offset,
new file mode 100644
@@ -0,0 +1,20 @@
+/* PR sanitizer/110027 */
+/* { dg-do run } */
+/* { dg-require-effective-target avx512f_runtime } */
+/* { dg-options "-std=gnu++23 -mavx512f -fsanitize=address -O0 -g -fstack-protector-strong" } */
+
+#include <cstddef>
+#include <cstdint>
+
+template <ptrdiff_t W, typename T>
+using Vec [[gnu::vector_size(W * sizeof(T))]] = T;
+
+auto foo() {
+ Vec<8, int64_t> ret{};
+ return ret;
+}
+
+int main() {
+ foo();
+ return 0;
+}