From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24744 invoked by alias); 19 Nov 2014 20:05:46 -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 24720 invoked by uid 48); 19 Nov 2014 20:05:42 -0000 From: "vries at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/63979] [openacc] undefined reference to main._omp_fn.x Date: Wed, 19 Nov 2014 20:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries 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: 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-11/txt/msg02058.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63979 --- Comment #1 from vries at gcc dot gnu.org --- I only run into this with -flto-partition=balanced. >>From the exe.wpa.000i.cgraph dump: ... Total unit size: 2034, partition size: 1000 Step 0: added main._omp_fn.0/24, size 22, cost 1/0 best 1/0, step 0 Step 1: added main._omp_fn.1/23, size 44, cost 2/0 best 2/0, step 1 ... Step 17: added main._omp_fn.17/7, size 694, cost 18/0 best 18/0, step 17 Step 18: added main._omp_fn.18/6, size 735, cost 19/0 best 19/0, step 18 Step 19: added main._omp_fn.19/5, size 775, cost 20/0 best 19/0, step 18 Step 20: added main._omp_fn.20/4, size 816, cost 21/0 best 19/0, step 18 Step 21: added main/3, size 2034, cost 53/21 best 19/0, step 18 Unwinding 3 insertions to step 18 New partition Step 19: added main._omp_fn.19/5, size 40, cost 1/21 best 1/21, step 19 Step 20: added main._omp_fn.20/4, size 81, cost 2/21 best 2/21, step 20 Step 21: added main/3, size 1299, cost 72/23 best 2/21, step 20 Privatizing symbol name: main._omp_fn.0 -> main._omp_fn.0.lto_priv.0 Promoting as hidden: main._omp_fn.0 Privatizing symbol name: main._omp_fn.1 -> main._omp_fn.1.lto_priv.1 Promoting as hidden: main._omp_fn.1 ... In .exe.ltrans0.s, main._omp_fn.18 is privatized, but exported as global hidden: ... .text .globl main._omp_fn.18.lto_priv.18 .hidden main._omp_fn.18.lto_priv.18 .type main._omp_fn.18.lto_priv.18, @function main._omp_fn.18.lto_priv.18: ... In .exe.ltrans1.s, it is referenced, and declared as hidden: ... .hidden main._omp_fn.18.lto_priv.18 ... Conversely, in .exe.ltrans1.s, main._omp_fn.20 is not privatized: ... .type main._omp_fn.20, @function main._omp_fn.20: ... But in .exe.ltrans0.s, main._omp_fn.20 is referenced, and not declared: ... .omp_func_table.4851: .quad main._omp_fn.20 ...