public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bacon at aerodyne dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/17887] New: g77 generates code that results in segmentation fault
Date: Fri, 08 Oct 2004 02:24:00 -0000	[thread overview]
Message-ID: <20041008022405.17887.bacon@aerodyne.com> (raw)

The following code, when compiled with g77, produces an
executable that segfaults when run.  It was simple enough 
to work around, but the problem doesn't occur with the 
Intel fortran compiler or the Portland Group fortran 
compiler.

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C  bug.f
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

      PROGRAM  MAIN
      REAL*4  ANG
      ANG = ARCCOS( -1. )
      WRITE ( 6, 100 ) ANG
100   FORMAT('ARCCOS(-1) =', F10.4)
      STOP
      END
 
      REAL FUNCTION ARCCOS(X)
      REAL X
      IF(X.GT..9999999) X=1.
      IF(X.LT.-.9999999) X=-1.
      ARCCOS = ACOS(X)
      RETURN
      END
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C END
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC


g77 -v -save-temps -fno-globals -fno-automatic -Wall -g -o bugger bug.f

Driving: g77 -v -save-temps -fno-globals -fno-automatic -Wall -g -o bugger bug.f
-lfrtbegin -lg2c -lm -shared-libgcc
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --disable-libunwind-exceptions --with-system-zlib
--enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)
 /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/f771 bug.f -quiet -dumpbase bug.f
-auxbase bug -g -Wall -version -fno-globals -fno-automatic -o bug.s
GNU F77 version 3.3.3 20040412 (Red Hat Linux 3.3.3-7) (i386-redhat-linux)
        compiled by GNU C version 3.3.3 20040412 (Red Hat Linux 3.3.3-7).
GGC heuristics: --param ggc-min-expand=63 --param ggc-min-heapsize=63613
 as -V -Qy -o bug.o bug.s
GNU assembler version 2.15.90.0.3 (i386-redhat-linux) using BFD version
2.15.90.0.3 20040415
 /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/collect2 --eh-frame-hdr -m elf_i386
-dynamic-linker /lib/ld-linux.so.2 -o bugger
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crti.o
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/crtbegin.o
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3
-L/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../.. bug.o -lfrtbegin -lg2c -lm
-lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/crtend.o
/usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crtn.o

-- 
           Summary: g77 generates code that results in segmentation fault
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bacon at aerodyne dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-redhat-linux
  GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux


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


             reply	other threads:[~2004-10-08  2:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-08  2:24 bacon at aerodyne dot com [this message]
2004-10-08  2:47 ` [Bug fortran/17887] " pinskia at gcc dot gnu dot org
2004-10-08  3:10 ` bdavis at gcc dot gnu dot org
2004-10-08  3:15 ` bdavis 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=20041008022405.17887.bacon@aerodyne.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).