From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1524 invoked by alias); 23 Mar 2014 23:18:28 -0000 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 Received: (qmail 1487 invoked by uid 48); 23 Mar 2014 23:18:22 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/60543] [4.7/4.8/4.9 Regression] Function with side effect removed by the optimizer. Date: Sun, 23 Mar 2014 23:18: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-Version: 4.8.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg02114.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60543 --- Comment #12 from Dominique d'Humieres --- > Yes, I did; I used "make clean" first (also "rm *.o *.f90 *.s" in the main > folder to clean up the files generated by -save-temps). Did you update the compiler name in your makefile? I have just been caught by that when comparing the results in the bug_OPT1mode_withWRITE and bug_OPT1mode_noWRITE directories. With the right compiler for both, I get 2000 1058 1005 1017 Can you do the following cp MOD/generalfunctions.mod generalFunctions.mod.gz gunzip generalFunctions.mod.gz grep PURE generalFunctions.mod you should only see UNKNOWN-PROC DECL UNKNOWN 0 0 INTRINSIC FUNCTION PURE) () (CHARACTER 1 0 UNKNOWN-PROC DECL UNKNOWN 0 0 INTRINSIC FUNCTION PURE) () (CHARACTER 1 0 i.e., no IMPLICIT_PURE.