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 --- 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; --
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;