This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gomp] Fix tree dump with #pragma omp single nowait
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>, Diego Novillo <dnovillo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 9 Nov 2005 07:56:05 -0500
- Subject: [gomp] Fix tree dump with #pragma omp single nowait
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
I have noticed #pragma omp single nowait is printed as
#pragma omp singlenowait
(note missing space), on the other side say for
#pragma omp sections
we print an extra space at the end.
Fixed thusly, ok for gomp?
2005-11-09 Jakub Jelinek <jakub@redhat.com>
* tree-pretty-print.c (dump_omp_clauses): Add pp_space call if
clause is not NULL.
(dump_generic_node) <case OMP_PARALLEL, OMP_FOR, OMP_SECTIONS>: Don't
print space after directive name.
--- gcc/tree-pretty-print.c.jj 2005-10-31 23:36:11.000000000 +0100
+++ gcc/tree-pretty-print.c 2005-11-09 13:36:20.000000000 +0100
@@ -252,6 +252,7 @@ dump_omp_clauses (pretty_printer *buffer
if (clause == NULL)
return;
+ pp_space (buffer);
while (1)
{
switch (TREE_CODE (clause))
@@ -1660,7 +1661,7 @@ dump_generic_node (pretty_printer *buffe
break;
case OMP_PARALLEL:
- pp_string (buffer, "#pragma omp parallel ");
+ pp_string (buffer, "#pragma omp parallel");
dump_omp_clauses (buffer, OMP_PARALLEL_CLAUSES (node), spc, flags);
dump_omp_body:
newline_and_indent (buffer, spc + 2);
@@ -1673,7 +1674,7 @@ dump_generic_node (pretty_printer *buffe
break;
case OMP_FOR:
- pp_string (buffer, "#pragma omp for ");
+ pp_string (buffer, "#pragma omp for");
dump_omp_clauses (buffer, OMP_FOR_CLAUSES (node), spc, flags);
if (OMP_FOR_PRE_BODY (node))
{
@@ -1708,7 +1709,7 @@ dump_generic_node (pretty_printer *buffe
break;
case OMP_SECTIONS:
- pp_string (buffer, "#pragma omp sections ");
+ pp_string (buffer, "#pragma omp sections");
dump_omp_clauses (buffer, OMP_SECTIONS_CLAUSES (node), spc, flags);
goto dump_omp_body;
Jakub