public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kamaraju at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/21459] New: Fortran runtime error: Unexpected end of format string
Date: Mon, 09 May 2005 03:25:00 -0000	[thread overview]
Message-ID: <20050509032552.21459.kamaraju@gmail.com> (raw)

Consider the following test code

program format_string
  implicit none
  character(len=*), parameter :: rform='(F15.5)', &
  cform="(' (', F15.5, ',' F15.5, ') ')"

  call print_a_number(cform)
contains
subroutine print_a_number(style)
  character(len=*) :: style
  write(*, style) cmplx(0.0, 0.0)
end subroutine print_a_number
end program format_string

This program compiles fine. But gives a runtime error.

$gfortran-20050507-1 -v
Using built-in specs.
Target: i486-linux
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang
--prefix=/usr/lib/gcc-snapshot --enable-shared --with-system-zlib --disable-nls
--program-suffix=-20050507-1 --enable-__cxa_atexit
--enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug
--enable-java-gc=boehm --enable-java-awt=gtk --enable-mpfr --disable-werror
--disable-werror i486-linux
Thread model: posix
gcc version 4.1.0 20050507 (experimental)

$gfortran format_string.f90 -o format_string

$./a.out
At line 10 of file format_string.f90
Fortran runtime error: Unexpected end of format string
(' (',
      ^

I am using Debian Sid distribution, gcc-snapshot 20050507-1 package.

The above program compiles and runs fine with Absoft Fortran 90/95 compiler and
with intel fortran compiler 8.1 Build 20040921. The interaction with Absoft
compiler looks as follows

$f90 format_string.f90
rajulocal@kusumanchi:~/work/fortran/gfortran_bugs 28  527 11:21 PM
$./a.out
 (        0.00000,        0.00000)

-- 
           Summary: Fortran runtime error: Unexpected end of format string
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kamaraju at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


             reply	other threads:[~2005-05-09  3:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-09  3:25 kamaraju at gmail dot com [this message]
2005-05-09  3:39 ` [Bug libfortran/21459] " pinskia at gcc dot gnu dot org
2005-05-09 11:17 ` [Bug libfortran/21459] strings of different length in a single character(len=*) declaration fxcoudert at gcc dot gnu dot org
2005-05-11 20:24 ` tobi at gcc dot gnu dot org
2005-05-11 20:45 ` tobi 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=20050509032552.21459.kamaraju@gmail.com \
    --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).