]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++ frontend: initialize ivdep value
authorTamar Christina <tamar.christina@arm.com>
Wed, 10 Jan 2024 13:46:22 +0000 (13:46 +0000)
committerTamar Christina <tamar.christina@arm.com>
Wed, 10 Jan 2024 13:46:40 +0000 (13:46 +0000)
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.

gcc/cp/ChangeLog:

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

gcc/cp/parser.cc

index d71522dcd74ddbc1b9192b16225a936a357ae25a..8ab98cc0c231c5c6128c10dc610079039da815ab 100644 (file)
@@ -50971,7 +50971,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;