This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24516] [gomp] Incorrect error for break statement in OpenMP loop
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2005 21:42:26 -0000
- Subject: [Bug c++/24516] [gomp] Incorrect error for break statement in OpenMP loop
- References: <bug-24516-2736@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from cvs-commit at gcc dot gnu dot org 2005-10-25 21:42 -------
Subject: Bug 24516
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gomp-20050608-branch
Changes by: jakub@gcc.gnu.org 2005-10-25 21:42:21
Modified files:
gcc/cp : ChangeLog.gomp
gcc/testsuite : ChangeLog.gomp
gcc/cp : parser.c
Added files:
gcc/testsuite/gcc.dg/gomp: block-11.c
gcc/testsuite/g++.dg/gomp: block-11.C
Log message:
PR c++/24516
* parser.c (struct cp_parser): Rename in_iteration_statement
field to in_statement.
(IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
(IN_OMP_BLOCK, IN_OMP_FOR): Change values.
(cp_parser_new, cp_parser_begin_omp_structured_block,
cp_parser_end_omp_structured_block, cp_parser_omp_for_loop): Adjust
for in_iteration_statement renaming.
(cp_parser_selection_statement): Save parser->in_iteration, or it
temporarily with IN_SWITCH_STMT for the
cp_parser_implicitly_scoped_statement call.
(cp_parser_iteration_statement): Adjust for in_iteration_statement
renaming. Use IN_ITERATION_STMT rather than true.
(cp_parser_jump_statement): Adjust for in_iteration_statement
renaming and new values. Don't error on break in a switch statement
within OMP_FOR or OpenMP structured block.
* gcc.dg/gomp/block-11.c: New test.
* g++.dg/gomp/block-11.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.gomp.diff?cvsroot=gcc&only_with_tag=gomp-20050608-branch&r1=1.1.8.24&r2=1.1.8.25
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.gomp.diff?cvsroot=gcc&only_with_tag=gomp-20050608-branch&r1=1.1.2.46&r2=1.1.2.47
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gomp-20050608-branch&r1=1.340.4.21&r2=1.340.4.22
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/gomp/block-11.c.diff?cvsroot=gcc&only_with_tag=gomp-20050608-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/gomp/block-11.C.diff?cvsroot=gcc&only_with_tag=gomp-20050608-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24516