From stdcxx-dev-return-1025-apmail-incubator-stdcxx-dev-archive=incubator.apache.org@incubator.apache.org Wed Mar 01 20:18:44 2006 Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 86223 invoked from network); 1 Mar 2006 20:18:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Mar 2006 20:18:44 -0000 Received: (qmail 86469 invoked by uid 500); 1 Mar 2006 20:19:31 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 86457 invoked by uid 500); 1 Mar 2006 20:19:30 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 86446 invoked by uid 99); 1 Mar 2006 20:19:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2006 12:19:30 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 44357DD for ; Wed, 1 Mar 2006 21:19:05 +0100 (CET) Message-ID: <80233304.1141244345277.JavaMail.jira@ajax.apache.org> Date: Wed, 1 Mar 2006 21:19:05 +0100 (CET) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Commented: (STDCXX-157) [XLC++ 8.0/Linux] explicit instantiation fails to emit some symbols In-Reply-To: <351279974.1141243422389.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/STDCXX-157?page=comments#action_12368350 ] Martin Sebor commented on STDCXX-157: ------------------------------------- Here's a more obvious test case that shows how this actually causes a problem: $ cat t.cpp && xlC -F /package/1/ppc64/compilers/ibm/va80/vac.cfg -c t.cpp && xlC -F /package/1/ppc64/compilers/ibm/va80/vac.cfg -Dmain=main -c t.cpp -o a.o && xlC -F /package/1/ppc64/compilers/ibm/va80/vac.cfg a.o t.o template T foo (T t) { return t; } template struct S { T bar () { return foo (T ()); } void baz () { foo(0); } }; #ifdef main extern template struct S; int main () { return S().bar (); } #else template struct S; #endif a.o(.text+0x1c): In function `main': : undefined reference to `S::bar()' > [XLC++ 8.0/Linux] explicit instantiation fails to emit some symbols > ------------------------------------------------------------------- > > Key: STDCXX-157 > URL: http://issues.apache.org/jira/browse/STDCXX-157 > Project: C++ Standard Library > Type: Bug > Components: External > Environment: $ uname -sr && xlC -qversion > Linux 2.6.5-7.191-pseries64 > IBM XL C/C++ Advanced Edition V8.0 for Linux > Version: 08.00.0000.0000 > Reporter: Martin Sebor > > PMR 02236,K78,000 > XLC++ 8.0 fails to emit a symbol for the member function S::bar() in the program below. > $ cat t.cpp && xlC -c t.cpp && echo xlc: && nm -C t.o && > echo gcc: && gcc -c t.cpp && nm -C t.o > template T foo (T t) { return t; } > template > struct S > { > T bar () { return foo (T ()); } > void baz () { foo(0); } > }; > template struct S; > xlc: > U __IBMCPlusPlusExceptionV2 > 00000000 W int foo(int) > 00000014 W S::baz() > gcc: > 00000000 W int foo(int) > 00000000 W S::bar() > 00000000 W S::baz() -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira