The "collapse" clause of OpenMP causes the GCC to abort the compilation with an error. The output of gcc is:
Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-fopenmp' '-o' 'omp-matrix' '-mtune=generic' '-pthread' /usr/lib/gcc/i486-linux-gnu/4.3.3/cc1 -E -quiet -v -D_REENTRANT omp-matrix.c -D_FORTIFY_SOURCE=2 -mtune=generic -fopenmp -fpch-preprocess -o omp-matrix.i ignoring nonexistent directory "/usr/local/include/i486-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../i486-linux-gnu/include" ignoring nonexistent directory "/usr/include/i486-linux-gnu" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/lib/gcc/i486-linux-gnu/4.3.3/include /usr/lib/gcc/i486-linux-gnu/4.3.3/include-fixed /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-fopenmp' '-o' 'omp-matrix' '-mtune=generic' '-pthread' /usr/lib/gcc/i486-linux-gnu/4.3.3/cc1 -fpreprocessed omp-matrix.i -quiet -dumpbase omp-matrix.c -mtune=generic -auxbase omp-matrix -version -fopenmp -fstack-protector -o omp-matrix.s GNU C (Ubuntu 4.3.3-5ubuntu4) version 4.3.3 (i486-linux-gnu) compiled by GNU C version 4.3.3, GMP version 4.2.4, MPFR version 2.4.0. GGC heuristics: --param ggc-min-expand=97 --param ggc-min-heapsize=127140 Compiler executable checksum: 0bf5703b57e064ca90b48f4e2c186f4a omp-matrix.c: In function main: omp-matrix.c:51: error: expected #pragma omp clause before collapse Since the program included code written by myself, I searched for an example program online and found one in a wiki on the Sun website which causes the same problem: http://wikis.sun.com/display/openmp/Loop+Collapse Please note that this is my first bug report for GCC, so I want to apologize in advance for any mistake :) -- Summary: OpenMP: "collapse" clause in for-statement causes gcc to abort with an error Product: gcc Version: 4.3.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: frederik dot moellers at gmx dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40418