From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23280 invoked by alias); 13 Oct 2009 08:22:22 -0000 Received: (qmail 23186 invoked by uid 48); 13 Oct 2009 08:22:04 -0000 Date: Tue, 13 Oct 2009 08:22:00 -0000 Subject: [Bug fortran/41694] New: ICE with -fopenmp -O -g and -fwhopr or -flto X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "anlauf at gmx dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg01103.txt.bz2 Hi, when compiling and linking the following program: % cat openmp-test.F90 implicit none #if _OPENMP >= 200505 !$ integer :: OMP_GET_NUM_THREADS, OMP_GET_MAX_THREADS, OMP_GET_THREAD_NUM #else integer :: OMP_GET_NUM_THREADS, OMP_GET_MAX_THREADS, OMP_GET_THREAD_NUM #endif integer :: i print *, "OpenMP version:", _OPENMP print * !$OMP parallel do do i = 1, OMP_GET_MAX_THREADS () print *, "OMP_GET_THREAD_NUM =",OMP_GET_THREAD_NUM(),OMP_GET_NUM_THREADS() end do !$OMP end parallel do end program % gfc4x -O -g -fopenmp openmp-test.F90 -fwhopr lto1: error: missing callgraph edge for call stmt: # .MEM_26 = VDEF <.MEM_25> _gfortran_st_write (&dt_parm.2); lto1: error: missing callgraph edge for call stmt: # .MEM_27 = VDEF <.MEM_26> _gfortran_transfer_character (&dt_parm.2, &"OMP_GET_THREAD_NUM ="[1]{lb: 1 sz: 1}, 20); lto1: error: edge points to wrong declaration: > QI size unit size align 8 symtab 0 alias set -1 canonical type 0x2b9f7e461300 arg-types chain >> pointer_to_this > public external QI file (null) line 0 col 0 align 8> Instead of: