From 41211dbc86c4aab6a1ff0097385655fe1b5e9911 Mon Sep 17 00:00:00 2001 From: minhqdao Date: Sun, 4 Aug 2024 00:58:54 +0530 Subject: [PATCH] Only allocate once --- src/stdlib_array_allocation.fypp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/stdlib_array_allocation.fypp b/src/stdlib_array_allocation.fypp index fc01ec341..98bd652bc 100644 --- a/src/stdlib_array_allocation.fypp +++ b/src/stdlib_array_allocation.fypp @@ -23,11 +23,6 @@ contains msg = "Failed to allocate array"; return end if - allocate (t_array_${t1[0]}$${k1}$_${rank}$ :: wrapper%array, stat=stat) - if (stat /= 0) then - msg = 'Failed to allocate array.'; return - end if - select type (typed_array => wrapper%array) class is (t_array_${t1[0]}$${k1}$_${rank}$) typed_array%values = source_array