From f1e48433ecbe27da366d4ab2a2dd751de4ce2dfb Mon Sep 17 00:00:00 2001
From: "James K. Lowden" <jklowden@symas.com>
Date: Sat, 27 Apr 2024 15:50:53 -0400
Subject: [PATCH] allow LENGTH OF for -dialect mf

---
 gcc/cobol/parse.y | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/cobol/parse.y b/gcc/cobol/parse.y
index 97dbe6bfdf28..258225aa5c15 100644
--- a/gcc/cobol/parse.y
+++ b/gcc/cobol/parse.y
@@ -5907,7 +5907,7 @@ num_value:      scalar
                   location_set(@1);
                   $$ = new cbl_refer_t( new_tempnumeric() );
                   auto r1 = $val;
-                  if( ! dialect_ibm() ) {
+                  if( dialect_gcc() ) {
                     yyerrorv("LENGTH OF %s requires '-dialect ibm' option",
                              $val->field->name);
                   }
@@ -6096,7 +6096,7 @@ signed_literal:     num_literal
                   location_set(@1);
                   $$ = new_tempnumeric();
                   auto r1 = $val;
-                  if( ! dialect_ibm() ) {
+                  if( dialect_gcc() ) {
                     yyerrorv("LENGTH OF %s requires '-dialect ibm' option",
                              $val->field->name);
                   }
@@ -6477,7 +6477,7 @@ varg1:          scalar
                   location_set(@1);
                   $$ = new cbl_refer_t( new_tempnumeric_float() );
                   auto r1 = $val;
-                  if( ! dialect_ibm() ) {
+                  if( dialect_gcc() ) {
                     yyerrorv("LENGTH OF %s requires '-dialect ibm' option",
                              $val->field->name);
                   }
-- 
GitLab