Patch written by Kurt Lust, UAntwerp for PRACE IP UEABS
 - Backports a change to c/xc/tpss.c from 19.8.1 to 1.5.2.
 - Backports a change to c/xc/revtpss.c from 19.8.1 to 1.5.2.
--- gpaw-1.5.2/c/xc/tpss.c.orig	2020-10-22 16:15:29.000000000 +0200
+++ gpaw-1.5.2/c/xc/tpss.c	2020-10-22 16:37:41.000000000 +0200
@@ -427,12 +427,11 @@
   int nder = (nspin==XC_UNPOLARIZED) ? 1 : 3;
   for(i=0; i<nder; i++){
     if(nspin==XC_UNPOLARIZED) dauxdsigma[i] /= 2.;
-    double dCdsigma[i];
-    dCdsigma[i]=  dCdcsi*dcsidsigma[i];
+    double dCdsigma = dCdcsi*dcsidsigma[i];
 
     /* partial derivatives*/
-    de_PKZBdsigma[i] = de_PBEdsigma[i] * (1.0 + C * zsq) + dens * e_PBE * dCdsigma[i] * zsq
-      - zsq * (dens * dCdsigma[i] * aux + (1.0 + C) * dauxdsigma[i]);
+    de_PKZBdsigma[i] = de_PBEdsigma[i] * (1.0 + C * zsq) + dens * e_PBE * dCdsigma * zsq
+      - zsq * (dens * dCdsigma * aux + (1.0 + C) * dauxdsigma[i]);
 
   }
 }
--- gpaw-1.5.2/c/xc/revtpss.c.orig	2020-10-22 16:15:29.000000000 +0200
+++ gpaw-1.5.2/c/xc/revtpss.c	2020-10-22 17:12:40.000000000 +0200
@@ -231,12 +231,11 @@
   int nder = (p->common.nspin==XC_UNPOLARIZED) ? 1 : 3;
   for(i=0; i<nder; i++){
     if(p->common.nspin==XC_UNPOLARIZED) dauxdsigma[i] /= 2.;
-    double dCdsigma[i]; 
-    dCdsigma[i]=  dCdcsi*dcsidsigma[i];
-	
+    double dCdsigma =  dCdcsi*dcsidsigma[i];
+
     /* partial derivatives*/
-    de_PKZBdsigma[i] = de_PBEdsigma[i] * (1.0 + C * zsq) + dens * e_PBE * dCdsigma[i] * zsq
-      - zsq * (dens * dCdsigma[i] * aux + (1.0 + C) * dauxdsigma[i]);
+    de_PKZBdsigma[i] = de_PBEdsigma[i] * (1.0 + C * zsq) + dens * e_PBE * dCdsigma * zsq
+      - zsq * (dens * dCdsigma * aux + (1.0 + C) * dauxdsigma[i]);
 
   }
 } 
