@@ -4026,19 +4026,22 @@ nvptx_record_offload_symbol (tree decl)
case FUNCTION_DECL:
{
- tree attr = get_oacc_fn_attrib (decl);
- tree dims = TREE_VALUE (attr);
- unsigned ix;
-
fprintf (asm_out_file, "//:FUNC_MAP \"%s\"",
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
- for (ix = 0; ix != GOMP_DIM_MAX; ix++, dims = TREE_CHAIN (dims))
+ tree attr = get_oacc_fn_attrib (decl);
+ if (attr)
{
- int size = TREE_INT_CST_LOW (TREE_VALUE (dims));
+ tree dims = TREE_VALUE (attr);
+ unsigned ix;
- gcc_assert (!TREE_PURPOSE (dims));
- fprintf (asm_out_file, ", %#x", size);
+ for (ix = 0; ix != GOMP_DIM_MAX; ix++, dims = TREE_CHAIN (dims))
+ {
+ int size = TREE_INT_CST_LOW (TREE_VALUE (dims));
+
+ gcc_assert (!TREE_PURPOSE (dims));
+ fprintf (asm_out_file, ", %#x", size);
+ }
}
fprintf (asm_out_file, "\n");