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

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).