From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14659 invoked by alias); 7 Sep 2012 21:30:12 -0000 Received: (qmail 14647 invoked by uid 22791); 7 Sep 2012 21:30:11 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_CX,TW_GC X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 07 Sep 2012 21:29:58 +0000 From: "aap1 at psu dot edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/54522] New: Using "g77 -O -fno-automatic", reassignment of a variable in an if statement in a function triggers a compiler bug. Date: Fri, 07 Sep 2012 21:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aap1 at psu dot edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-09/txt/msg00651.txt.bz2 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 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