public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53580] New: Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives
@ 2012-06-05 4:30 fedediazceo at gmail dot com
2012-06-05 6:34 ` [Bug c/53580] " jakub at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: fedediazceo at gmail dot com @ 2012-06-05 4:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53580
Bug #: 53580
Summary: Internal Segmentation fault in nested "omp parallel",
"omp parallel for" and "omp parallel for reduction"
Directives
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: fedediazceo@gmail.com
Created attachment 27559
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27559
Attached preprocesses source that the output demands
When trying to compile nested #pragma omp parallel, #pragma omp parallel for
and #pragma omp parallel for reduction (+:variable), the compiler throws an
internal error:segmentation fault.
--------test code-------
#include <stdio.h>
#include <omp.h>
int main(int argc, char **argv){
int x, y, variableReduction=0;
#pragma omp parallel
#pragma omp for
for(x=0; x <= 10 ; x++){
#pragma omp for reduction(+: variableReduction)
for(y=0; y <= 10 ; y++){
variableReduction += 0;
}
}
return variableReduction;
}-----------------------
gcc -v
Using internal specifications.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
The command line arguments and the output is:
gcc -Wall -Wextra -fopenmp test.c -o test
test.c:12:9: warning: work-sharing region may not be closely nested inside of
work-sharing, critical, ordered, master or explicit task region [enabled by
default]
test.c:12:9: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cck4oOHH.out file, please attach this to
your bugreport.
Somewhat similar to Bug report 35674
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35674) but different compiler
context (i think)
Hope it's clear enough, my first bug report :-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/53580] Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives
2012-06-05 4:30 [Bug c/53580] New: Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives fedediazceo at gmail dot com
@ 2012-06-05 6:34 ` jakub at gcc dot gnu.org
2012-06-05 11:07 ` fernando at info dot unlp.edu.ar
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-05 6:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53580
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-05 06:34:08 UTC ---
I'll look at it, but note that your testcase is invalid OpenMP.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/53580] Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives
2012-06-05 4:30 [Bug c/53580] New: Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives fedediazceo at gmail dot com
2012-06-05 6:34 ` [Bug c/53580] " jakub at gcc dot gnu.org
@ 2012-06-05 11:07 ` fernando at info dot unlp.edu.ar
2012-06-06 16:06 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: fernando at info dot unlp.edu.ar @ 2012-06-05 11:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53580
Fernando G. Tinetti <fernando at info dot unlp.edu.ar> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fernando at info dot
| |unlp.edu.ar
--- Comment #2 from Fernando G. Tinetti <fernando at info dot unlp.edu.ar> 2012-06-05 11:07:07 UTC ---
(In reply to comment #1)
> I'll look at it, but note that your testcase is invalid OpenMP.
We saw this with Federico, and we agree in that the testcase is invalid OpenMP
code. Furthermore:
1) the compiler message is right.
2) should the compiler report an error instead of a warning? (I don't know what
the compiler is required to report...).
Fernando.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/53580] Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives
2012-06-05 4:30 [Bug c/53580] New: Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives fedediazceo at gmail dot com
2012-06-05 6:34 ` [Bug c/53580] " jakub at gcc dot gnu.org
2012-06-05 11:07 ` fernando at info dot unlp.edu.ar
@ 2012-06-06 16:06 ` jakub at gcc dot gnu.org
2012-06-06 17:42 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-06 16:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53580
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-06-06
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-06 16:05:51 UTC ---
Created attachment 27565
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27565
gcc48-pr53580.patch
Untested 4.8 patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/53580] Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives
2012-06-05 4:30 [Bug c/53580] New: Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives fedediazceo at gmail dot com
` (2 preceding siblings ...)
2012-06-06 16:06 ` jakub at gcc dot gnu.org
@ 2012-06-06 17:42 ` jakub at gcc dot gnu.org
2012-06-06 17:51 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-06 17:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53580
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #27565|0 |1
is obsolete| |
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-06 17:41:45 UTC ---
Created attachment 27566
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27566
gcc48-pr53580.patch
Updated 4.8 patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/53580] Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives
2012-06-05 4:30 [Bug c/53580] New: Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives fedediazceo at gmail dot com
` (3 preceding siblings ...)
2012-06-06 17:42 ` jakub at gcc dot gnu.org
@ 2012-06-06 17:51 ` jakub at gcc dot gnu.org
2012-06-07 6:37 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-06 17:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53580
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-06 17:50:42 UTC ---
Created attachment 27567
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27567
gcc47-pr53580.patch
Untested 4.7 patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/53580] Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives
2012-06-05 4:30 [Bug c/53580] New: Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives fedediazceo at gmail dot com
` (4 preceding siblings ...)
2012-06-06 17:51 ` jakub at gcc dot gnu.org
@ 2012-06-07 6:37 ` jakub at gcc dot gnu.org
2012-06-14 17:49 ` jakub at gcc dot gnu.org
2012-06-15 11:12 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-07 6:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53580
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-07 06:37:00 UTC ---
Author: jakub
Date: Thu Jun 7 06:36:55 2012
New Revision: 188298
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188298
Log:
PR middle-end/53580
* omp-low.c (scan_omp): Change first argument to
gimple_seq *, call walk_gimple_seq_mod instead of
walk_gimple_seq.
(scan_sharing_clauses, scan_omp_parallel, scan_omp_task,
scan_omp_for, scan_omp_sections, scan_omp_single,
execute_lower_omp): Adjust callers.
(scan_omp_1_stmt): Likewise. If check_omp_nesting_restrictions
returns false, replace stmt with GIMPLE_NOP.
(check_omp_nesting_restrictions): Instead of issuing warnings,
issue errors and return false if any errors were reported.
* gcc.dg/gomp/nesting-1.c: Expect errors rather than warnings.
* gcc.dg/gomp/critical-4.c: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.1.f90: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.3.f90: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise.
* c-c++-common/gomp/pr53580.c: New test.
* testsuite/libgomp.c/pr26943-2.c: Remove #pragma omp barrier,
use GOMP_barrier () call instead.
* testsuite/libgomp.c/pr26943-3.c: Likewise.
* testsuite/libgomp.c/pr26943-4.c: Likewise.
* testsuite/libgomp.fortran/vla4.f90: Remove !$omp barrier,
call GOMP_barrier instead.
* testsuite/libgomp.fortran/vla5.f90: Likewise.
Added:
trunk/gcc/testsuite/c-c++-common/gomp/pr53580.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/omp-low.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/gomp/critical-4.c
trunk/gcc/testsuite/gcc.dg/gomp/nesting-1.c
trunk/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.1.f90
trunk/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.3.f90
trunk/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.4.f90
trunk/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.6.f90
trunk/libgomp/ChangeLog
trunk/libgomp/testsuite/libgomp.c/pr26943-2.c
trunk/libgomp/testsuite/libgomp.c/pr26943-3.c
trunk/libgomp/testsuite/libgomp.c/pr26943-4.c
trunk/libgomp/testsuite/libgomp.fortran/vla4.f90
trunk/libgomp/testsuite/libgomp.fortran/vla5.f90
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/53580] Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives
2012-06-05 4:30 [Bug c/53580] New: Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives fedediazceo at gmail dot com
` (5 preceding siblings ...)
2012-06-07 6:37 ` jakub at gcc dot gnu.org
@ 2012-06-14 17:49 ` jakub at gcc dot gnu.org
2012-06-15 11:12 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-14 17:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53580
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-14 17:48:42 UTC ---
Author: jakub
Date: Thu Jun 14 17:48:38 2012
New Revision: 188625
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188625
Log:
Backported from mainline
2012-06-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/53580
* omp-low.c (scan_omp_1_stmt): If check_omp_nesting_restrictions
returns false, replace stmt with GIMPLE_NOP.
(check_omp_nesting_restrictions): Instead of issuing warnings,
issue errors and return false if any errors were reported.
* gcc.dg/gomp/nesting-1.c: Expect errors rather than warnings.
* gcc.dg/gomp/critical-4.c: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.1.f90: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.3.f90: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise.
* gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise.
* c-c++-common/gomp/pr53580.c: New test.
* testsuite/libgomp.c/pr26943-2.c: Remove #pragma omp barrier,
use GOMP_barrier () call instead.
* testsuite/libgomp.c/pr26943-3.c: Likewise.
* testsuite/libgomp.c/pr26943-4.c: Likewise.
* testsuite/libgomp.fortran/vla4.f90: Remove !$omp barrier,
call GOMP_barrier instead.
* testsuite/libgomp.fortran/vla5.f90: Likewise.
Added:
branches/gcc-4_7-branch/gcc/testsuite/c-c++-common/gomp/pr53580.c
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/omp-low.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/gomp/critical-4.c
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/gomp/nesting-1.c
branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.1.f90
branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.3.f90
branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.4.f90
branches/gcc-4_7-branch/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.6.f90
branches/gcc-4_7-branch/libgomp/ChangeLog
branches/gcc-4_7-branch/libgomp/testsuite/libgomp.c/pr26943-2.c
branches/gcc-4_7-branch/libgomp/testsuite/libgomp.c/pr26943-3.c
branches/gcc-4_7-branch/libgomp/testsuite/libgomp.c/pr26943-4.c
branches/gcc-4_7-branch/libgomp/testsuite/libgomp.fortran/vla4.f90
branches/gcc-4_7-branch/libgomp/testsuite/libgomp.fortran/vla5.f90
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/53580] Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives
2012-06-05 4:30 [Bug c/53580] New: Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives fedediazceo at gmail dot com
` (6 preceding siblings ...)
2012-06-14 17:49 ` jakub at gcc dot gnu.org
@ 2012-06-15 11:12 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-06-15 11:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53580
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-06-15 11:12:27 UTC ---
FIxed for 4.7+, not backporting further, as this is ice-on-invalid only.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-06-15 11:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-05 4:30 [Bug c/53580] New: Internal Segmentation fault in nested "omp parallel", "omp parallel for" and "omp parallel for reduction" Directives fedediazceo at gmail dot com
2012-06-05 6:34 ` [Bug c/53580] " jakub at gcc dot gnu.org
2012-06-05 11:07 ` fernando at info dot unlp.edu.ar
2012-06-06 16:06 ` jakub at gcc dot gnu.org
2012-06-06 17:42 ` jakub at gcc dot gnu.org
2012-06-06 17:51 ` jakub at gcc dot gnu.org
2012-06-07 6:37 ` jakub at gcc dot gnu.org
2012-06-14 17:49 ` jakub at gcc dot gnu.org
2012-06-15 11:12 ` jakub at gcc dot gnu.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).