[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:02:46 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115623
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tamar Christina <tnfchris@gcc.gnu.org>:
https://gcc.gnu.org/g:84acbfbecbdbc3fb2a395bd97e338b2b26fad374
commit r15-1841-g84acbfbecbdbc3fb2a395bd97e338b2b26fad374
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.
More information about the Gcc-bugs
mailing list