From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23083 invoked by alias); 20 Oct 2005 11:42:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 23061 invoked by uid 48); 20 Oct 2005 11:42:38 -0000 Date: Thu, 20 Oct 2005 11:42:00 -0000 Subject: [Bug c/24451] New: [gomp] Return out of parallel loop not rejected X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "reichelt at gcc dot gnu dot org" X-SW-Source: 2005-10/txt/msg02658.txt.bz2 List-Id: 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