From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30475 invoked by alias); 17 Aug 2004 05:50:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 30427 invoked by uid 48); 17 Aug 2004 05:50:19 -0000 Date: Tue, 17 Aug 2004 05:50:00 -0000 Message-ID: <20040817055019.30426.qmail@sourceware.org> From: "mmitchel at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040816214702.17053.dje@gcc.gnu.org> References: <20040816214702.17053.dje@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/17053] [3.5 Regression] Repo functionality partially broken on AIX X-Bugzilla-Reason: CC X-SW-Source: 2004-08/txt/msg01623.txt.bz2 List-Id: ------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-08-17 05:50 ------- It looks like collect2.c does template instantiation first, followed by discovery of global constructors -- on all platforms except those that define COLLECT_EXPORT_LIST, i.e., all platforms except AIX. On AIX, we do these things in the opposite order: constructor discovery first, followed by template instantiation. The AIX order does not seem safe, in general: instantiating templates can certainly result in the need for additional static constructors. I'm not sure how best to fix this. In the abstract, it's wrong of the C++ front end not to instantiate the template in all cases; the standard requires we instantiate it. However, with -frepo, we've always tried to avoid instantiating templates unncessarily. Without doing full optimization on the template body, we wouldn't be assured of getting NOTHROW set correctly anyhow. I guess I need to understand why collect2 does things in the opposite order in AIX. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17053