public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41694]  New: ICE with -fopenmp -O -g and -fwhopr or -flto
@ 2009-10-13  8:22 anlauf at gmx dot de
  2009-10-13  9:35 ` [Bug middle-end/41694] " burnus at gcc dot gnu dot org
  2009-10-14 10:55 ` rguenth at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: anlauf at gmx dot de @ 2009-10-13  8:22 UTC (permalink / raw)
  To: gcc-bugs

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:
 <function_decl 0x2b9f7e45bb00 _gfortran_st_write
    type <function_type 0x2b9f7e461300
        type <void_type 0x2b9f7db08f00 VOID
            align 8 symtab 0 alias set -1 canonical type 0x2b9f7db08f00
            pointer_to_this <pointer_type 0x2b9f7db16000>>
        QI
        size <integer_cst 0x2b9f7dafa810 constant 8>
        unit size <integer_cst 0x2b9f7dafa840 constant 1>
        align 8 symtab 0 alias set -1 canonical type 0x2b9f7e461300
        arg-types <tree_list 0x2b9f7e460d80 value <pointer_type 0x2b9f7e45ad80>
            chain <tree_list 0x2b9f7e460db0 value <void_type 0x2b9f7db08f00>>>
        pointer_to_this <pointer_type 0x2b9f7e461a80>>
    public external QI file (null) line 0 col 0 align 8>
 Instead of: <function_decl 0x2b9f7e45b600 omp_get_thread_num
    type <function_type 0x2b9f7e45ac00
        type <integer_type 0x2b9f7db08540 public SI
[...more output...]
lto1: internal compiler error: verify_cgraph_node failed

and similar for -flto.

The error disappears when either -O, -g, -fwhopr or -flto are
removed.

Cheers,
-ha


-- 
           Summary: ICE with -fopenmp -O -g and -fwhopr or -flto
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at gmx dot de


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/41694] ICE with -fopenmp -O -g and -fwhopr or -flto
  2009-10-13  8:22 [Bug fortran/41694] New: ICE with -fopenmp -O -g and -fwhopr or -flto anlauf at gmx dot de
@ 2009-10-13  9:35 ` burnus at gcc dot gnu dot org
  2009-10-14 10:55 ` rguenth at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-10-13  9:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2009-10-13 09:35 -------
Note: -g does not work yet with -fwhopr or -flto.

See also: PR 41521 and 41566


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|fortran                     |middle-end
           Keywords|                            |lto


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/41694] ICE with -fopenmp -O -g and -fwhopr or -flto
  2009-10-13  8:22 [Bug fortran/41694] New: ICE with -fopenmp -O -g and -fwhopr or -flto anlauf at gmx dot de
  2009-10-13  9:35 ` [Bug middle-end/41694] " burnus at gcc dot gnu dot org
@ 2009-10-14 10:55 ` rguenth at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-10-14 10:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-10-14 10:55 -------


*** This bug has been marked as a duplicate of 41521 ***


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-14 10:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-13  8:22 [Bug fortran/41694] New: ICE with -fopenmp -O -g and -fwhopr or -flto anlauf at gmx dot de
2009-10-13  9:35 ` [Bug middle-end/41694] " burnus at gcc dot gnu dot org
2009-10-14 10:55 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).