[Bug c++/115623] ICE: Segmentation fault in finish_for_cond with novector and almost infinite loop
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 4 10:04:43 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115623
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Tamar Christina
<tnfchris@gcc.gnu.org>:
https://gcc.gnu.org/g:1742b699c31e3ac4dadbedb6036ee2498b569259
commit r14-10378-g1742b699c31e3ac4dadbedb6036ee2498b569259
Author: Tamar Christina <tamar.christina@arm.com>
Date: Thu Jul 4 11:01:55 2024 +0100
c++ frontend: check for missing condition for novector [PR115623]
It looks like I forgot to check in the C++ frontend if a condition exist
for the
loop being adorned with novector. This causes a segfault because cond
isn't
expected to be null.
This fixes it by issuing ignoring the pragma when there's no loop condition
the same way we do in the C frontend.
gcc/cp/ChangeLog:
PR c++/115623
* semantics.cc (finish_for_cond): Add check for C++ cond.
gcc/testsuite/ChangeLog:
PR c++/115623
* g++.dg/vect/vect-novector-pragma_2.cc: New test.
(cherry picked from commit 84acbfbecbdbc3fb2a395bd97e338b2b26fad374)
More information about the Gcc-bugs
mailing list