From 3afed6e9f76dc7ec75c69892dd5c9d2b4b9f5ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiziano=20M=C3=BCller?= Date: Thu, 7 Sep 2023 12:12:35 +0200 Subject: [PATCH] index_ops: avoid allocating 0-size buffers and init them with negative ranges for nblks=0 case --- src/block/dbcsr_index_operations.F | 1 + 1 file changed, 1 insertion(+) diff --git a/src/block/dbcsr_index_operations.F b/src/block/dbcsr_index_operations.F index 09b9acf950f..256ee62af6d 100644 --- a/src/block/dbcsr_index_operations.F +++ b/src/block/dbcsr_index_operations.F @@ -591,6 +591,7 @@ SUBROUTINE dbcsr_sort_indices(n, row_i, col_i, blk_p, blk_d) ! --------------------------------------------------------------------------- + IF (n .LE. 0) RETURN IF (SIZE(row_i) .EQ. 0) RETURN CALL timeset(routineN, error_handle)