From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30960 invoked by alias); 28 May 2014 11:18:50 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 30932 invoked by uid 48); 28 May 2014 11:18:46 -0000 From: "philippe.virouleau at imag dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/61342] New: Segfault when using default clause and VLA in OpenMP task Date: Wed, 28 May 2014 11:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: philippe.virouleau at imag dot fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg02399.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61342 Bug ID: 61342 Summary: Segfault when using default clause and VLA in OpenMP task Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: philippe.virouleau at imag dot fr Created attachment 32871 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32871&action=edit produced output I got a segmentation fault from gcc when compiling a code using variable length array inside an open mp task, with "default(none)" specified. The minimal example that triggers the segfault with my gcc is the following : int main() { int x = 2; int y = 2; double f_[2][2]; double (*f)[x][y] = (double (*)[x][y])f_; #pragma omp parallel #pragma omp master { for (int i = 0; i < x; i++) for (int j = 0; j < y; j++) #pragma omp task default(none) shared(f) firstprivate(i, j) { (*f)[i][j] = 1; } } } Attached is the is the produced stacktrace (with command line and gcc version), and my operating system is Debian (Linux daisy 3.14-1-amd64 #1 SMP Debian 3.14.4-1 (2014-05-13) x86_64 GNU/Linux). Note that removing the "default(none)" makes the code compile normally