From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18032 invoked by alias); 3 Feb 2012 15:06:30 -0000 Received: (qmail 18018 invoked by uid 22791); 3 Feb 2012 15:06:29 -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; Fri, 03 Feb 2012 15:06:16 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/50981] [4.4/4.5/4.6 Regression] Wrong-code for scalarizing ELEMENTAL call with absent OPTIONAL argument Date: Fri, 03 Feb 2012 15:06: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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: mikael at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.4.7 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: 2012-02/txt/msg00368.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50981 --- Comment #36 from Tobias Burnus 2012-02-03 15:05:55 UTC --- I lost a bit the overview, but I think the following still needs to be done: - 4.4/4.5/4.6: Backporting the fix for nonpresent actuals to elemental procs, cf. commit in comment 5 / comment 6. That is a true [4.4-4.6] regression - 4.6: Backporting for the fix for unallocated/unassociated variables to elemental procedures. That's not a true regression. - The test case of comment 13 / attachment 26291 with the test-case corrections of comment 22 This test case still fails. There are some draft patches for that in this PR. - The test case of comment 23 / attachment 26392 "sub_ctae" is invalid in needs to be removed. The test case compiles without any problems, but the program segfaults at run time for: call sub_ct(var1) call sub_ct(var2) if the variables aren't allocated. That seems to be the same issue as comment 31. Namely: The present() check does not work for CLASS. - For the following, a test case should be written, tested, and included in the test suite (partially covered by the tests above): OPTIONAL dummy argument: - actual argument not present (i.e. compiler added null), "NULL()", nonallocated actual, nonassociated actual. But also: Actual present. - Actual argument a scalar or an array - Actual argument CLASS or TYPE - Actual argument a variable or a derived-type component Dummy argument: CLASS or TYPE ELEMENTAL procedure with scalar or nonelemental with (scalar or) array dummy argument. For passing a CLASS actual to a TYPE dummy, see also PR 51514.