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: unassig...@gcc.gnu.org ReportedBy: fedediaz...@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 :-)