This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/33372] New: segfault on incomplete code in openmp mode

Playing with the code reduction tools, i produced a segfault with the following
(incomplete) code:

template < typename T >
void f ( )
unsigned n ( ) ;
#pragma omp parallel num_threads(n)

$ /suse/NOBACKUP/gcc/gcc-4.2-branch/bin/g++ -v -march=i686 -O3 -fopenmp  -W
-Wall -c segfault2.ii
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4_2-branch/configure --enable-languages=c,c++
Thread model: posix
gcc version 4.2.2 20070910 (prerelease)
-fpreprocessed segfault2.ii -quiet -dumpbase segfault2.ii -march=i686 -auxbase
segfault2 -O3 -W -Wall -version -fopenmp -o /tmp/ccUQF7PA.s
GNU C++ version 4.2.2 20070910 (prerelease) (i686-pc-linux-gnu)
        compiled by GNU C version 4.2.2 20070908 (prerelease).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 4c766e638e42be49e7fc1a3400590598
segfault2.ii: In function ?void f()?:
segfault2.ii:5: internal compiler error: Segmentation fault

without -fopenmp, I get

segfault2.ii:5: warning: ignoring #pragma omp parallel
segfault2.ii:4: error: expected `}' at end of input

           Summary: segfault on incomplete code in openmp mode
           Product: gcc
           Version: 4.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc at abeckmann dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]