diff --git a/runtime/src/kmp_gsupport.cpp b/runtime/src/kmp_gsupport.cpp
index 3634719789e072eed29eeee114e3192d50c2b71e..dc52957018b282d8e9e3e0dcca3d2b5a9dd308eb 100644
--- a/runtime/src/kmp_gsupport.cpp
+++ b/runtime/src/kmp_gsupport.cpp
@@ -948,32 +948,39 @@ xexpand(KMP_API_NAME_GOMP_TASK)(void (*func)(void *), void *data, void (*copy_fu
     }
   }
   else /* dependence */ {
-    kmp_depend_info_t* dep_list = taskdata->td_deps;
 
-    int count_out = (int) (uintptr_t)depend[1]; /* for 0..count_out: out dependences */
-
-    /* depend[i+2] is the address on which to compute dependency */
-    for (kmp_int32 i=0; i<(kmp_int32)(uintptr_t)depend[0]; ++i)
+    if (depend)
     {
-      dep_list[i].base_addr = (uintptr_t)depend[i+2];
-      dep_list[i].len       = 1;
-      dep_list[i].flags.in  = 1;
-      dep_list[i].flags.out = (i<count_out ? 1: 0);
-      dep_list[i].flags.cw  = 0;
-      dep_list[i].flags.commute = 0;
-      dep_list[i].flags.alias = 0;
+      kmp_depend_info_t* dep_list = taskdata->td_deps;
+      int count_out = (int) (uintptr_t)depend[1]; /* for 0..count_out: out dependences */
+
+      /* depend[i+2] is the address on which to compute dependency */
+      for (kmp_int32 i=0; i<(kmp_int32)(uintptr_t)depend[0]; ++i)
+      {
+        dep_list[i].base_addr = (uintptr_t)depend[i+2];
+        dep_list[i].len       = 1;
+        dep_list[i].flags.in  = 1;
+        dep_list[i].flags.out = (i<count_out ? 1: 0);
+        dep_list[i].flags.cw  = 0;
+        dep_list[i].flags.commute = 0;
+        dep_list[i].flags.alias = 0;
+      }
     }
     /* consider that gcc does not fill ALL dependencies fields */
+/* BUG HERE: gcc move extra dep to taskdata->deps and omp_task_with_deps recompute the total
+   number of deps using also extra deps stored in threaddata.
+*/
+#error "STOP"
     taskdata->td_flags.depsfill= 0;
     if (if_cond)
       __kmpc_omp_task_with_deps( &loc, gtid, task,
-          (kmp_int32)(uintptr_t)depend[0], taskdata->td_deps,
-          0, 0
+          taskdata->td_ndeps, taskdata->td_deps,
+          taskdata->td_ndeps_noalias, taskdata->td_deps_noalias
       );
     else {
       __kmpc_omp_wait_deps( &loc, gtid,
-        (kmp_int32)(uintptr_t)depend[0], taskdata->td_deps,
-        0, 0
+          taskdata->td_ndeps, taskdata->td_deps,
+          taskdata->td_ndeps_noalias, taskdata->td_deps_noalias
       );
 #if OMPT_SUPPORT
       ompt_thread_info_t oldInfo;