public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c/24451] New: [gomp] Return out of parallel loop not rejected @ 2005-10-20 11:42 reichelt at gcc dot gnu dot org 2005-10-20 16:39 ` [Bug c++/24451] " reichelt at gcc dot gnu dot org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: reichelt at gcc dot gnu dot org @ 2005-10-20 11:42 UTC (permalink / raw) To: gcc-bugs The following code is accepted with -fopenmp although a return from a parallel for loop is not allowed: ================================ void foo() { int i; #pragma omp parallel for for ( i=0; i<10; ++i ) return; } ================================ When a value is returned, we get an ICE instead: ================================ int foo() { int i; #pragma omp parallel for for ( i=0; i<10; ++i ) return 0; } ================================ bug.c: In function '__omp_fn.1': bug.c:4: internal compiler error: in expand_expr_real_1, at expr.c:8307 Please submit a full bug report, [etc.] The same holds for the C++ frontend; the ICE is just in a different position. -- Summary: [gomp] Return out of parallel loop not rejected Product: gcc Version: unknown Status: UNCONFIRMED Keywords: ice-on-invalid-code, accepts-invalid, openmp Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24451 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/24451] [gomp] Return out of parallel loop not rejected 2005-10-20 11:42 [Bug c/24451] New: [gomp] Return out of parallel loop not rejected reichelt at gcc dot gnu dot org @ 2005-10-20 16:39 ` reichelt at gcc dot gnu dot org 2005-10-20 20:14 ` rth at gcc dot gnu dot org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: reichelt at gcc dot gnu dot org @ 2005-10-20 16:39 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from reichelt at gcc dot gnu dot org 2005-10-20 16:39 ------- Hey the development is really fast on the gomp branch. The C frontend seems to be fixed now. I get a sensible error message now for both testcases: bug.c: In function '__omp_fn.1': bug.c:6: error: invalid exit from OpenMP structured block Btw, should this really be __omp_fn.1? The C++ frontend remains broken, however: I get a sgefault now for both testcases. -- reichelt at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|c |c++ Keywords|accepts-invalid | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24451 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/24451] [gomp] Return out of parallel loop not rejected 2005-10-20 11:42 [Bug c/24451] New: [gomp] Return out of parallel loop not rejected reichelt at gcc dot gnu dot org 2005-10-20 16:39 ` [Bug c++/24451] " reichelt at gcc dot gnu dot org @ 2005-10-20 20:14 ` rth at gcc dot gnu dot org 2005-10-21 22:07 ` cvs-commit at gcc dot gnu dot org 2005-10-21 22:10 ` rth at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: rth at gcc dot gnu dot org @ 2005-10-20 20:14 UTC (permalink / raw) To: gcc-bugs -- rth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rth at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2005-10-20 20:14:35 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24451 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/24451] [gomp] Return out of parallel loop not rejected 2005-10-20 11:42 [Bug c/24451] New: [gomp] Return out of parallel loop not rejected reichelt at gcc dot gnu dot org 2005-10-20 16:39 ` [Bug c++/24451] " reichelt at gcc dot gnu dot org 2005-10-20 20:14 ` rth at gcc dot gnu dot org @ 2005-10-21 22:07 ` cvs-commit at gcc dot gnu dot org 2005-10-21 22:10 ` rth at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2005-10-21 22:07 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from cvs-commit at gcc dot gnu dot org 2005-10-21 22:07 ------- Subject: Bug 24451 CVSROOT: /cvs/gcc Module name: gcc Branch: gomp-20050608-branch Changes by: rth@gcc.gnu.org 2005-10-21 22:06:53 Modified files: gcc/cp : ChangeLog.gomp cp-tree.h decl.c semantics.c Added files: gcc/testsuite/g++.dg/gomp: block-8.C gcc/testsuite/gcc.dg/gomp: block-8.c Log message: PR c++/24451 * decl.c (check_omp_return): Return false on error. * cp-tree.h (check_omp_return): Update decl. * semantics.c (finish_return_stmt): Avoid adding return on error. 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.16&r2=1.1.8.17 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=gomp-20050608-branch&r1=1.1144.4.15&r2=1.1144.4.16 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gomp-20050608-branch&r1=1.1403.4.11&r2=1.1403.4.12 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&only_with_tag=gomp-20050608-branch&r1=1.475.4.14&r2=1.475.4.15 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/gomp/block-8.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/gcc.dg/gomp/block-8.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=24451 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/24451] [gomp] Return out of parallel loop not rejected 2005-10-20 11:42 [Bug c/24451] New: [gomp] Return out of parallel loop not rejected reichelt at gcc dot gnu dot org ` (2 preceding siblings ...) 2005-10-21 22:07 ` cvs-commit at gcc dot gnu dot org @ 2005-10-21 22:10 ` rth at gcc dot gnu dot org 3 siblings, 0 replies; 5+ messages in thread From: rth at gcc dot gnu dot org @ 2005-10-21 22:10 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from rth at gcc dot gnu dot org 2005-10-21 22:10 ------- Fixed. -- rth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24451 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-10-21 22:10 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-10-20 11:42 [Bug c/24451] New: [gomp] Return out of parallel loop not rejected reichelt at gcc dot gnu dot org 2005-10-20 16:39 ` [Bug c++/24451] " reichelt at gcc dot gnu dot org 2005-10-20 20:14 ` rth at gcc dot gnu dot org 2005-10-21 22:07 ` cvs-commit at gcc dot gnu dot org 2005-10-21 22:10 ` rth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).