From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20585 invoked by alias); 8 Jul 2002 16:36:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 20567 invoked by uid 71); 8 Jul 2002 16:36:00 -0000 Resent-Date: 8 Jul 2002 16:36:00 -0000 Resent-Message-ID: <20020708163600.20566.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, Frank.Seehase@pdv-fs.de Received: (qmail 18460 invoked by uid 61); 8 Jul 2002 16:29:08 -0000 Message-Id: <20020708162908.18459.qmail@sources.redhat.com> Date: Mon, 08 Jul 2002 09:36:00 -0000 From: Frank.Seehase@pdv-fs.de Reply-To: Frank.Seehase@pdv-fs.de To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/7234: Link Problem, GCC 3.1 on AIX 4.3.3 X-SW-Source: 2002-07/txt/msg00247.txt.bz2 List-Id: >Number: 7234 >Category: c++ >Synopsis: Link Problem, GCC 3.1 on AIX 4.3.3 >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Jul 08 09:36:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: F. G. Seehase >Release: gcc version 3.1 >Organization: >Environment: AIX 4.3.3 ML 10 Configured with: ../configure --prefix=/tools/pkg/gcc/3.1 --disable-threads Thread model: aix >Description: When linking an executable, not referenced objects from a library are pulled in, maybe due to static objects initialization code, even if there is no C++ code. The garbarge collection of the AIX Linker fails. If the code is compiled as .c (not .cc) files with gcc (not g++) there is no problem. >How-To-Repeat: Symbol fct3 is missing even fct2 is unused. > g++ -v Reading specs from /tools/pkg/gcc/3.1/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.1/specs Configured with: ../configure --prefix=/tools/pkg/gcc/3.1 --disable-threads Thread model: aix gcc version 3.1 > ar -V GNU ar 2.12.1 > g++ -Wall -c -o fct1.o fct1.cc > g++ -Wall -c -o fct2.o fct2.cc > g++ -Wall -c -o main.o main.cc > ar -rv libTst.a fct1.o fct2.o > g++ -Wall -o main main.o libTst.a /* --- fct1.cc --- */ void fct3( void ); void fct2( void ) { fct3( ); } /* --- fct2.cc --- */ void fct1( void ) { } /* --- main.cc --- */ void fct1( void ); int main( void ) { fct1( ); return 0; } >Fix: >Release-Note: >Audit-Trail: >Unformatted: