From 4651aba4463fb750e75e5972b13fc734f96c50a4 Mon Sep 17 00:00:00 2001
From: "James K. Lowden" <jklowden@symas.com>
Date: Sat, 30 Dec 2023 12:08:54 -0500
Subject: [PATCH] SET accespts NULLS

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

diff --git a/gcc/cobol/parse.y b/gcc/cobol/parse.y
index 55a80e7b7039..5e4ea8cd3ff2 100644
--- a/gcc/cobol/parse.y
+++ b/gcc/cobol/parse.y
@@ -6803,6 +6803,14 @@ set:            SET set_tgts[tgts] TO set_operand[src]
                     YYERROR;
                   }
                 }
+	|	SET set_tgts[tgts] TO NULLS[src]
+		{
+                  statement_begin(@1, SET);
+		  if( !valid_set_targets(*$tgts, true) ) {
+		    YYERROR;
+		  }
+		  ast_set_pointers($tgts->targets, constant_of(constant_index(NULLS)));
+		}
 	|	SET set_tgts TO spaces_etc[error]
 		{
 		  yyerror("syntax error: invalid value for SET TO");
@@ -9532,6 +9540,7 @@ constant_index( int token ) {
   case HIGH_VALUE  :
   case HIGH_VALUES : return verify_figconst(high_value_e, 4);
   case QUOTES      : return 5;
+  case NULLS       : return 6;
   }
   errx(EXIT_FAILURE, "%s:%d: no such constant %d", __func__, __LINE__, token);
   return (size_t)-1;
-- 
GitLab