public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kloedej at knmi dot nl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/23654] New: internal compiler error: in gfc_conv_function_call
Date: Wed, 31 Aug 2005 14:29:00 -0000	[thread overview]
Message-ID: <20050831142105.23654.kloedej@knmi.nl> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1662 bytes --]

The following i.m.o. correct code lets gfortran crash:

module problem
  implicit none
contains
  !---
  subroutine compare_words
    character(len=1), dimension(:), pointer :: word1
    allocate(word1(5))
    word1(1:5) = (/ '1','2','3','4','5' /)
    call print_word(chararray2string(word1))
    deallocate(word1)
  end subroutine compare_words
  !---
  subroutine print_word(word1)
    character(len=*), intent(in) :: word1 ! input
    print *,"word1 = ",word1
  end subroutine print_word
  !---  
  function chararray2string(chararray) result(text)
    !  #[
    character(len=1), dimension(:) :: chararray      ! input
    character(len=size(chararray)) :: text           ! output
    text = transfer(chararray,text)
  end function chararray2string
  !---
end module problem

program testproblem
  USE problem, only: compare_words
  call compare_words
end program Testproblem


The compiler responds as follows:

>gfortran -o problem problem.F90
problem.F90: In function ‘compare_words’:
problem.F90:8: internal compiler error: in gfc_conv_function_call, at
fortran/trans-expr.c:1107
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>

-- 
           Summary: internal compiler error: in gfc_conv_function_call
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kloedej at knmi dot nl
                CC: gcc-bugs at gcc dot gnu dot org


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


             reply	other threads:[~2005-08-31 14:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-31 14:29 kloedej at knmi dot nl [this message]
2005-08-31 15:15 ` [Bug fortran/23654] " pinskia 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=20050831142105.23654.kloedej@knmi.nl \
    --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).