From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101524 invoked by alias); 21 Jul 2015 22:27:31 -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 101452 invoked by uid 48); 21 Jul 2015 22:27:27 -0000 From: "cesar at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/66714] ICE in loc_list_from_tree with -g Date: Tue, 21 Jul 2015 22:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: ice-on-valid-code, openacc, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: cesar at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: cc attachments.created 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: 2015-07/txt/msg01862.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66714 cesar at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cesar at gcc dot gnu.org --- Comment #20 from cesar at gcc dot gnu.org --- Created attachment 36030 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36030&action=edit replace block vars fix Tom, thanks for your detailed analysis and reduced test case. As you suspected, replace_block_vars_by_duplicates isn't updating the DECL_VALUE_EXPR properly. That function is setting the value expr to be the original decl, not the new offloaded copy. My patch teaches it how to use an offloaded copy. All of the value exprs we're interested in for openacc are INDIRECT_REFs and I think that holds true for openmp too. Fortran cray pointers caused some minor problems because those get represented by a INDIRECT_REF to a CONVERT_EXPR as you in the patch. I tested this patch in gomp-4_0-branch libgomp and everything appears to work. Does this issue present in trunk too? Cesar