public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Frank.Seehase@pdv-fs.de
To: gcc-gnats@gcc.gnu.org
Subject: c++/7234: Link Problem, GCC 3.1 on AIX 4.3.3
Date: Mon, 08 Jul 2002 09:36:00 -0000	[thread overview]
Message-ID: <20020708162908.18459.qmail@sources.redhat.com> (raw)


>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:


             reply	other threads:[~2002-07-08 16:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-08  9:36 Frank.Seehase [this message]
2002-08-05 10:40 dje
2003-01-22 10:46 Roger van Valen
2003-01-22 10:46 Roger van Valen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020708162908.18459.qmail@sources.redhat.com \
    --to=frank.seehase@pdv-fs.de \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).