diff --git a/compute/zgepdf_qr.c b/compute/zgepdf_qr.c
index 6ea672f01b08c662f3c76b7ced956a5ea4b78dbe..7878133284e6db05cec9d43e48beabf4a84b33cd 100644
--- a/compute/zgepdf_qr.c
+++ b/compute/zgepdf_qr.c
@@ -85,8 +85,11 @@ int CHAMELEON_zgepdf_qr_Tile( int doqr, int optid,
     CHAM_context_t     *chamctxt;
     RUNTIME_sequence_t *sequence = NULL;
     RUNTIME_request_t   request = RUNTIME_REQUEST_INITIALIZER;
-    CHAM_desc_t         D1, *D1ptr = NULL;
-    CHAM_desc_t         D2, *D2ptr = NULL;
+#if defined(CHAMELEON_COPY_DIAG)
+    CHAM_desc_t         D1, D2;
+#endif
+    CHAM_desc_t        *D1ptr = NULL;
+    CHAM_desc_t        *D2ptr = NULL;
     int                 status;
 
     chamctxt = chameleon_context_self();