public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54522] New: Using "g77 -O -fno-automatic", reassignment of a variable in an if statement in a function triggers a compiler bug.
@ 2012-09-07 21:30 aap1 at psu dot edu
  2012-09-07 21:40 ` [Bug fortran/54522] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: aap1 at psu dot edu @ 2012-09-07 21:30 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54522
           Summary: Using "g77 -O -fno-automatic", reassignment of a
                    variable in an if statement in a function triggers a
                    compiler bug.
    Classification: Unclassified
           Product: gcc
           Version: 3.4.6
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: aap1@psu.edu


C g77 bug found 9/7/2012.
C When command "g77 -c -O -fno-automatic reasssignment_bug.for" is
C used on the included code, the following is produced:
C
C   reassignment_bug.for: In function `dum':
C   In file included from reassignment_bug.for:0:
C   reassignment_bug.for:7: internal compiler error: in gen_reg_rtx, at
C   emit-rtl.c:819
C   Please submit a full bug report,
C   with preprocessed source if appropriate.
C   See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
C
C The code is non-sensical but valid and should not crash the compiler.
C The logic was found in a larger more complex piece of code where the
C cause was hard to find.
C
C Compiler version from "g77 -v":
C Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
C Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
C --infodir=/usr/share/info --enable-shared --enable-threads=posix
C --disable-checking --with-system-zlib --enable-__cxa_atexit
C --disable-libunwind-exceptions --enable-languages=c,c++,f77
C --disable-libgcj --host=x86_64-redhat-linux
C Thread model: posix
C gcc version 3.4.6 20060404 (Red Hat 3.4.6-19.el6)
C
      FUNCTION DUM(A)
      B=A
      IF (B.EQ.1) B=A
      DUM=B
      RETURN
      END


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

* [Bug fortran/54522] Using "g77 -O -fno-automatic", reassignment of a variable in an if statement in a function triggers a compiler bug.
  2012-09-07 21:30 [Bug fortran/54522] New: Using "g77 -O -fno-automatic", reassignment of a variable in an if statement in a function triggers a compiler bug aap1 at psu dot edu
@ 2012-09-07 21:40 ` pinskia at gcc dot gnu.org
  2012-09-09 14:48 ` janus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-07 21:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-07 21:40:04 UTC ---
g77 is no longer supported.  It is over 6 years old now.


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

* [Bug fortran/54522] Using "g77 -O -fno-automatic", reassignment of a variable in an if statement in a function triggers a compiler bug.
  2012-09-07 21:30 [Bug fortran/54522] New: Using "g77 -O -fno-automatic", reassignment of a variable in an if statement in a function triggers a compiler bug aap1 at psu dot edu
  2012-09-07 21:40 ` [Bug fortran/54522] " pinskia at gcc dot gnu.org
@ 2012-09-09 14:48 ` janus at gcc dot gnu.org
  2012-09-09 15:27 ` dominiq at lps dot ens.fr
  2012-09-10 10:30 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: janus at gcc dot gnu.org @ 2012-09-09 14:48 UTC (permalink / raw)
  To: gcc-bugs

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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janus at gcc dot gnu.org

--- Comment #2 from janus at gcc dot gnu.org 2012-09-09 14:48:16 UTC ---
(In reply to comment #1)
> g77 is no longer supported.

gfortran, which is g77's successor, does not seem to have any trouble with your 
test case (I tried versions 4.3, 4.6, 4.7 and trunk).

Please consider upgrading to gfortran.


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

* [Bug fortran/54522] Using "g77 -O -fno-automatic", reassignment of a variable in an if statement in a function triggers a compiler bug.
  2012-09-07 21:30 [Bug fortran/54522] New: Using "g77 -O -fno-automatic", reassignment of a variable in an if statement in a function triggers a compiler bug aap1 at psu dot edu
  2012-09-07 21:40 ` [Bug fortran/54522] " pinskia at gcc dot gnu.org
  2012-09-09 14:48 ` janus at gcc dot gnu.org
@ 2012-09-09 15:27 ` dominiq at lps dot ens.fr
  2012-09-10 10:30 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-09-09 15:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-09-09 15:27:29 UTC ---
The test case with -O -fno-automatic compiles on powerpc-apple-darwin9 with gcc
3.4.3.


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

* [Bug fortran/54522] Using "g77 -O -fno-automatic", reassignment of a variable in an if statement in a function triggers a compiler bug.
  2012-09-07 21:30 [Bug fortran/54522] New: Using "g77 -O -fno-automatic", reassignment of a variable in an if statement in a function triggers a compiler bug aap1 at psu dot edu
                   ` (2 preceding siblings ...)
  2012-09-09 15:27 ` dominiq at lps dot ens.fr
@ 2012-09-10 10:30 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-09-10 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

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

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-09-10 10:30:36 UTC ---
Fixed by gfortran.


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

end of thread, other threads:[~2012-09-10 10:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-07 21:30 [Bug fortran/54522] New: Using "g77 -O -fno-automatic", reassignment of a variable in an if statement in a function triggers a compiler bug aap1 at psu dot edu
2012-09-07 21:40 ` [Bug fortran/54522] " pinskia at gcc dot gnu.org
2012-09-09 14:48 ` janus at gcc dot gnu.org
2012-09-09 15:27 ` dominiq at lps dot ens.fr
2012-09-10 10:30 ` rguenth at gcc dot gnu.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).