From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23722 invoked by alias); 29 Aug 2011 13:50:30 -0000 Received: (qmail 23657 invoked by uid 22791); 29 Aug 2011 13:50:27 -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; Mon, 29 Aug 2011 13:50:12 +0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/50225] The allocation status for polymorphic allocatable variables is not set properly Date: Mon, 29 Aug 2011 14:01: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr 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: 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-08/txt/msg02304.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50225 --- Comment #1 from Dominique d'Humieres 2011-08-29 13:49:48 UTC --- On x86_64-apple-darwin10 I don't need the option -fcheck=all to get the run-timr error. However the error goes away with any optimization above -O1 (at least all those I have tried;-). This is also true for the original code posted at http://gcc.gnu.org/ml/fortran/2011-08/msg00239.html which gives Two-dimensional walk: 1.0883 0.1832 1.0618 0.1794 0.9765 0.0804 0.9459 0.0489 0.8895 -0.0245 0.9696 -0.0471 0.9587 -0.0147 0.8620 0.0154 0.8912 -0.0200 0.9624 -0.0397 Three-dimensional walk: -0.5517 0.9285 0.1628 -0.6316 0.9795 0.1839 -0.5878 1.0590 0.2156 -0.6576 1.0815 0.3113 -0.5578 1.0328 0.3215 -0.5260 1.0436 0.4170 -0.4456 1.0752 0.4628 -0.4651 1.1609 0.3924 -0.4302 1.2149 0.3602 -0.5070 1.2377 0.4244 if compiled with -O1 or above. Note also that the executable obtained with -O1 run under valgrind without error. Apparently the "wrong part" is removed by some optimization starting at -O1.