From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32274 invoked by alias); 3 Nov 2011 14:56:33 -0000 Received: (qmail 32263 invoked by uid 22791); 3 Nov 2011 14:56:31 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 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; Thu, 03 Nov 2011 14:56:15 +0000 From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/50974] [4.7 regression] ICE on invalid on function used as variable Date: Thu, 03 Nov 2011 14:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Known to work Summary Known to fail Message-ID: In-Reply-To: References: 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: 2011-11/txt/msg00277.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50974 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org Known to work| |4.5.4, 4.6.3 Summary|ICE on invalid on function |[4.7 regression] ICE on |used as variable |invalid on function used as | |variable Known to fail| |4.7.0 --- Comment #2 from kargl at gcc dot gnu.org 2011-11-03 14:55:53 UTC --- Here's a reduced testcase. module test_mod implicit none contains function func1() real func1 func1 = func2 end function func1 function func2() real func2 func2 = 1 end function func2 end module test_mod Note, if func2 is moved above func1 in the file, then we get the expected error. foo.f90:16.17: func1 = func2 1 Error: Function 'func2' requires an argument list at (1) Also, note that the code compiles with 4.5.4 and 4.6.3, so this is a regression.