[committed,c++,frontend] : initialize ivdep value

Message ID patch-18142-tamar@arm.com
State Committed
Commit f8a70fb21767883f6d3c13e22be8d307dd98f342
Headers
Series [committed,c++,frontend] : initialize ivdep value |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

Tamar Christina Jan. 10, 2024, 1:48 p.m. UTC
  Hi All,

Should control enter the switch from one of the cases other than
the IVDEP one then the variable remains uninitialized.

This fixes it by initializing it to false.

Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu
and no issues

Committed as obvious.

Thanks,
Tamar

gcc/cp/ChangeLog:

	* parser.cc (cp_parser_pragma): Initialize to false.

--- inline copy of patch -- 
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index 379aeb56b152b9b29606ba4d75ad4c49dfe92aac..1b4ce1497e893d6463350eecf5ef4e88957f5f00 100644




--
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index 379aeb56b152b9b29606ba4d75ad4c49dfe92aac..1b4ce1497e893d6463350eecf5ef4e88957f5f00 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -50625,7 +50625,7 @@ cp_parser_pragma (cp_parser *parser, enum pragma_context context, bool *if_p)
     case PRAGMA_UNROLL:
     case PRAGMA_NOVECTOR:
       {
-	bool ivdep;
+	bool ivdep = false;
 	tree unroll = NULL_TREE;
 	bool novector = false;
 	const char *pragma_str;
  

Patch

--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -50625,7 +50625,7 @@  cp_parser_pragma (cp_parser *parser, enum pragma_context context, bool *if_p)
     case PRAGMA_UNROLL:
     case PRAGMA_NOVECTOR:
       {
-	bool ivdep;
+	bool ivdep = false;
 	tree unroll = NULL_TREE;
 	bool novector = false;
 	const char *pragma_str;