Indeed, I somehow managed to use the wrong of the two enums in the cast ...
Fixed in  r12-1760-gcac3527793b38164e2a83c7ccbfe0cfcf5ac95b8

On 23.06.21 16:13, Martin Liška wrote:

I noticed the patch causes the following clang warnings:
gcc/fortran/dump-parse-tree.c:1786:11: warning: comparison of
different enumeration types in switch statement ('enum
gfc_omp_defaultmap' and 'gfc_omp_defaultmap_category')
[-Wenum-compare-switch]

Thanks for reporting!

Tobias


-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München 
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank 
Thürauf
commit cac3527793b38164e2a83c7ccbfe0cfcf5ac95b8
Author: Tobias Burnus <tob...@codesourcery.com>
Date:   Wed Jun 23 22:10:43 2021 +0200

    fortran/dump-parse-tree.c: Use proper enum type
    
    gcc/fortran/ChangeLog:
    
            * dump-parse-tree.c (show_omp_clauses): Fix enum type used
            for dumping gfc_omp_defaultmap_category.

diff --git a/gcc/fortran/dump-parse-tree.c b/gcc/fortran/dump-parse-tree.c
index 07e98b7e30d..26841eefb7d 100644
--- a/gcc/fortran/dump-parse-tree.c
+++ b/gcc/fortran/dump-parse-tree.c
@@ -1781,7 +1781,7 @@ show_omp_clauses (gfc_omp_clauses *omp_clauses)
       if (i != OMP_DEFAULTMAP_CAT_UNCATEGORIZED)
 	{
 	  fputc (':', dumpfile);
-	  switch ((enum gfc_omp_defaultmap) i)
+	  switch ((enum gfc_omp_defaultmap_category) i)
 	    {
 	    case OMP_DEFAULTMAP_CAT_SCALAR: dfltmap = "SCALAR"; break;
 	    case OMP_DEFAULTMAP_CAT_AGGREGATE: dfltmap = "AGGREGATE"; break;

Reply via email to