]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fortran: Add default to switch in gfc_trans_transfer [PR117843]
authorAndrew Pinski <quic_apinski@quicinc.com>
Fri, 29 Nov 2024 09:00:11 +0000 (01:00 -0800)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 6 Dec 2024 09:04:48 +0000 (10:04 +0100)
This fixes a bootstrap failure due to a warning on enum values not being
handled. In this case, it is just checking two values and the rest should
are not handled so adding a default case fixes the issue.

Pushed as obvious.

PR fortran/117843
gcc/fortran/ChangeLog:

* trans-io.cc (gfc_trans_transfer): Add default case.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
(cherry picked from commit 48b72743b0e29871171593fe34856da62d954750)

gcc/fortran/trans-io.cc

index c7a50e8839c8a2b813f44e51d379b2f0001788d4..a1951a158ed38dc690db373957284848811f6f27 100644 (file)
@@ -2649,6 +2649,8 @@ gfc_trans_transfer (gfc_code * code)
                  case EXPR_FUNCTION:
                  case EXPR_OP:
                    goto scalarize;
+                 default:
+                   break;
                  }
              }
        }