[Bug libgomp/26224] New: ICE in C$OMP SINGLE / END SINGLE COPYPRIVATE( ) block

magnus_os at yahoo dot se gcc-bugzilla@gcc.gnu.org
Sat Feb 11 13:09:00 GMT 2006


This can perhaps be treated as a suggestion for improvement. There are also
some similarities with the 25952 report (which is also for OpenMP SINGLE).

On this code the GOMP branch sometimes reports ICE without any useful
information, sometimes ICE with something helpful to the programmer.

gfortran-gomp-new -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gomp-new
--program-suffix=-gomp-new --enable-threads=posix
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.2.0-gomp-20050608-branch 20060206 (experimental) (merged
20060206)


In the code below, KLIST is not declared, which is probably the cause of the
ICE. However, if KLIST is entered last in the COPYPRIVATE statement, the
compiler will more correctly report an error in the code and be more helpful to
the programmer (but still report an ICE).


gfortran-gomp-new -fopenmp -g -O0 -fautomatic -Wunused -c abcdef.for
abcdef.for:0: internal compiler error: Segmentation fault
Please submit a full bug report,

      SUBROUTINE ABCDEF

      IMPLICIT DOUBLE PRECISION ( A - H, O - Z ), INTEGER ( I - N )
C
      COMMON /ZZOOPP/ MVBS1, JNBNP2, JNWBS
C$OMP THREADPRIVATE(/ZZOOPP/)
C
      COMMON /ACLST/ IOUTP( 100 ), KBSTYP( 15000 ), NBK
C
      COMMON /POIUYT_P/ IBSFFD, NTSP, IIJJKK(15000), IBKR(1000)
C$OMP THREADPRIVATE(/POIUYT_P/)
C
C$OMP SINGLE
         DO 15 IBK = 1, NBK
            IBS = IBLK( IBK )
            JBS = IBKR( IBK )
            IBKR( IBK )   = IBS
            KBSTYP( IBS ) = IIJJKK( IBS )
 15      CONTINUE
C$OMP END SINGLE COPYPRIVATE( IBKR )
C
C$OMP SINGLE
      KOUT  = 0
      JNWBS = 1
      MVBS1 = 2
C
      JNBNP2 = 0
      NTSP = 0
C$OMP END SINGLE COPYPRIVATE( JNWBS, MVBS1, JNBNP2, KLIST, NTSP )
C
      IF ( IOUTP( 3 ) .GT. IOUTP( 1 ) ) THEN
         CALL ZZZZZ4( KOUT )
C$OMP BARRIER
      END IF
C
      RETURN
      END


Change the code to:
C$OMP END SINGLE COPYPRIVATE( JNWBS, MVBS1, JNBNP2, NTSP, KLIST )
                                                            ^
                                                            |
                                                            |

and the compilation will report this:

gfortran-gomp-new -fopenmp -g -O0 -fautomatic -Wunused -c abcdef.for
 In file abcdef.for:22

*$OMP SINGLE
                                                                       1
abcdef.for:0: internal compiler error: Segmentation fault
Please submit a full bug report


-- 
           Summary: ICE in C$OMP SINGLE / END SINGLE COPYPRIVATE( ) block
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: magnus_os at yahoo dot se


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26224



More information about the Gcc-bugs mailing list