This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/61342] New: Segfault when using default clause and VLA in OpenMP task
- From: "philippe.virouleau at imag dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 May 2014 11:18:44 +0000
- Subject: [Bug c/61342] New: Segfault when using default clause and VLA in OpenMP task
- Auto-submitted: auto-generated
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