@@ -492,7 +492,10 @@ ll_make_ftn_outlined_params(int func_sptr, int paramct, DTYPE *argtype, OMPACCEL
492492 aux.dpdsc_size + paramct + 100 );
493493
494494 while (paramct--) {
495- sprintf (name, " %sArg%d" , SYMNAME (func_sptr), count++);
495+ if (current_tinfo && cnt >= 2 )
496+ sprintf (name, " %s" , SYMNAME (ompaccel_tinfo_get (gbl.currsub )->symbols [cnt-2 ].device_sym ));
497+ else
498+ sprintf (name, " %sArg%d" , SYMNAME (func_sptr), count++);
496499 sym = getsymbol (name);
497500 SCP (sym, SC_DUMMY);
498501 if (*argtype == DT_CPTR) { /* either i8* or actual type( pass by value). */
@@ -510,12 +513,13 @@ ll_make_ftn_outlined_params(int func_sptr, int paramct, DTYPE *argtype, OMPACCEL
510513 {
511514 NEED ((current_tinfo->n_symbols + 1 ), current_tinfo->symbols , OMPACCEL_SYM,
512515 current_tinfo->sz_symbols , current_tinfo->sz_symbols * 2 );
513- current_tinfo->symbols [current_tinfo->n_symbols ].device_sym = static_cast <SPTR>(sym);
514516 if (cnt >= 2 ) {
515517 PASSBYVALP (sym, false );
516518 PASSBYREFP (sym, true );
517519 current_tinfo->symbols [current_tinfo->n_symbols ].host_sym =
518520 ompaccel_tinfo_get (gbl.currsub )->symbols [cnt-2 ].device_sym ;
521+ current_tinfo->symbols [current_tinfo->n_symbols ].device_sym =
522+ ompaccel_tinfo_get (gbl.currsub )->symbols [cnt-2 ].device_sym ;
519523 }
520524 current_tinfo->symbols [current_tinfo->n_symbols ].map_type = 0 ;
521525 current_tinfo->symbols [current_tinfo->n_symbols ].in_map = 0 ;
@@ -2683,7 +2687,10 @@ ll_make_helper_function_for_kmpc_parallel_51(SPTR scope_sptr, OMPACCEL_TINFO *or
26832687 func_args[1 ] = get_type (2 , TY_PTR, DT_INT8);// DT_CPTR; // bound_tid
26842688
26852689 for (int k = 2 ; k < func_args_cnt; k++) {
2686- func_args[k] = DTYPEG (symbols->device_sym );
2690+ if (DT_ISSCALAR ( DTYPEG (symbols->device_sym )))
2691+ func_args[k] = DT_CPTR;
2692+ else
2693+ func_args[k] = DTYPEG (symbols->device_sym );
26872694 PASSBYVALP (symbols->device_sym , false );
26882695 symbols++;
26892696 }
0 commit comments