From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93340 invoked by alias); 20 Apr 2015 21:15:32 -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 93283 invoked by uid 48); 20 Apr 2015 21:15:27 -0000 From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/65819] New: overzealous checking in gfc_check_dependency for identical=true Date: Mon, 20 Apr 2015 21:15: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-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoenig at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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: 2015-04/txt/msg01667.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65819 Bug ID: 65819 Summary: overzealous checking in gfc_check_dependency for identical=true Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: tkoenig at gcc dot gnu.org Just ran across this while trying to cook up a test case for matrix inlining. In the patch proposed for PR 37131, I have if (gfc_check_dependency (expr1, matrix_a, true) || gfc_check_dependency (expr1, matrix_b, true)) return 0; In the test case, I want to do f(3,1:eight:2,:) = matmul(f(1,1:3,2:3), f(2,2:3,:)) where clearly the lhs does not depend on the rhs. However, specifying true to gfc_dep_dependency leads to if (identical) return 1; before any checking is done. I'm not sure if there is a real-world test case yet, but there will be one soon, so I'll keep this PR as a reminder.