Commit
r14-1301-gd64e8e1224708e added u2.allocator to gfc_omp_namelist
for better readability and to permit to use namelist->expr for code
like the following:
!$omp allocators allocate(align(32) : dt%alloc_comp)
allocate (dt%alloc_comp(5))
!$omp allocate(dt%alloc_comp2) align(64)
allocate (dt%alloc_comp2(10))
However, for the parse-tree dump the change was incomplete.
gcc/fortran/ChangeLog:
* dump-parse-tree.cc (show_omp_namelist): Fix dump of the allocator
modifier of OMP_LIST_ALLOCATE.
(cherry picked from commit
99e3214f582b08b69b11b53eb3fc73b0919ef4f1)
+2023-10-26 Tobias Burnus <tobias@codesourcery.com>
+
+ Backported from master:
+ 2023-06-20 Tobias Burnus <tobias@codesourcery.com>
+
+ * dump-parse-tree.cc (show_omp_namelist): Fix dump of the allocator
+ modifier of OMP_LIST_ALLOCATE.
+
2023-10-26 Tobias Burnus <tobias@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
}
if (list_type == OMP_LIST_ALLOCATE)
{
- if (n->expr)
+ if (n->u2.allocator)
{
fputs ("allocator(", dumpfile);
show_expr (n->u2.allocator);
show_expr (n->u.align);
fputc (')', dumpfile);
}
- if (n->expr || n->u.align)
+ if (n->u2.allocator || n->u.align)
fputc (':', dumpfile);
- fputs (n->sym->name, dumpfile);
+ if (n->expr)
+ show_expr (n->expr);
+ else
+ fputs (n->sym->name, dumpfile);
if (n->next)
fputs (") ALLOCATE(", dumpfile);
continue;