[OpenACC privatization] Don't let unhandled 'IFN_UNIQUE_OACC_PRIVATE' linger [PR90115]
Make sure they're all handled in 'execute_oacc_device_lower'. Why we at all can have 'level == -1' cases is a separate bug to be fixed. gcc/ PR middle-end/90115 * omp-offload.c (execute_oacc_device_lower) <IFN_UNIQUE_OACC_PRIVATE>: Diagnose and handle for 'level == -1' case, too. * internal-fn.c (expand_UNIQUE): Don't expect 'IFN_UNIQUE_OACC_PRIVATE'.
This commit is contained in:
parent
3a285ebd0c
commit
ff451ea723
2 changed files with 6 additions and 6 deletions
|
@ -2969,8 +2969,6 @@ expand_UNIQUE (internal_fn, gcall *stmt)
|
|||
else
|
||||
gcc_unreachable ();
|
||||
break;
|
||||
case IFN_UNIQUE_OACC_PRIVATE:
|
||||
break;
|
||||
}
|
||||
|
||||
if (pattern)
|
||||
|
|
|
@ -2139,8 +2139,9 @@ execute_oacc_device_lower ()
|
|||
{
|
||||
HOST_WIDE_INT level
|
||||
= TREE_INT_CST_LOW (gimple_call_arg (call, 2));
|
||||
if (level == -1)
|
||||
break;
|
||||
gcc_checking_assert (level == -1
|
||||
|| (level >= 0
|
||||
&& level < GOMP_DIM_MAX));
|
||||
for (unsigned i = 3;
|
||||
i < gimple_call_num_args (call);
|
||||
i++)
|
||||
|
@ -2156,11 +2157,12 @@ execute_oacc_device_lower ()
|
|||
{ "gang", "worker", "vector" };
|
||||
fprintf (dump_file, "Decl UID %u has %s "
|
||||
"partitioning:", DECL_UID (decl),
|
||||
axes[level]);
|
||||
(level == -1 ? "UNKNOWN" : axes[level]));
|
||||
print_generic_decl (dump_file, decl, TDF_SLIM);
|
||||
fputc ('\n', dump_file);
|
||||
}
|
||||
if (targetm.goacc.adjust_private_decl)
|
||||
if (level != -1
|
||||
&& targetm.goacc.adjust_private_decl)
|
||||
{
|
||||
tree oldtype = TREE_TYPE (decl);
|
||||
tree newdecl
|
||||
|
|
Loading…
Add table
Reference in a new issue