public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anlauf at gmx dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/41694]  New: ICE with -fopenmp -O -g and -fwhopr or -flto
Date: Tue, 13 Oct 2009 08:22:00 -0000	[thread overview]
Message-ID: <bug-41694-6318@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2009-10-13  8:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-13  8:22 anlauf at gmx dot de [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-41694-6318@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).