public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Luc.Maisonobe@cnes.fr To: gcc-gnats@gcc.gnu.org Subject: c/4109: undefined symbol whith -O2 on solaris 2.7 with gcc 3.0 Date: Fri, 24 Aug 2001 00:26:00 -0000 [thread overview] Message-ID: <20010824071729.19507.qmail@sourceware.cygnus.com> (raw) >Number: 4109 >Category: c >Synopsis: undefined symbol whith -O2 on solaris 2.7 with gcc 3.0 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Fri Aug 24 00:26:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Luc.Maisonobe@cnes.fr >Release: gcc-3.0 >Organization: >Environment: Solaris 2.7 >Description: I have encountered a bug on Solaris 2.7 with gcc 3.0. The problem occurs at link time. If the -O2 flag is used, then there is an undefined global symbol in the object file, and this symbol is not resolved at link time. I use a standard gcc 3.0 built on Solaris 2.7: (tucana) luc% gcc -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.0/specs Configured with: ../configure --prefix=/usr/local --enable-shared --enable-threads --enable-languages=c++,f77,java --enable-libgcj Thread model: posix gcc version 3.0 >How-To-Repeat: compile the attached file with the -O2 flag : gcc -O2 -c x.c look at the symbol table : nm x.o | grep LL I get this on my machine : [5] | 0| 0|NOTY |GLOB |0 |UNDEF |.LL9 >Fix: the problem disappears when optimization is turned off >Release-Note: >Audit-Trail: >Unformatted: undefined symbol whith -O2 on solaris 2.7 with gcc 3.0 ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="x.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="x.c" dHlwZWRlZiBzdHJ1Y3QgeyBpbnQgeCwgeTsgfSBBOwoKdHlwZWRlZiB1bmlvbiB7IGludCB0eXBl OwogICAgICAgICAgICAgICAgQSB4a2V5OwogICAgICAgICAgICAgICAgQSB4YnV0dG9uOwogICAg ICAgICAgICAgICAgQSB4bW90aW9uOwogICAgICAgICAgICAgICAgbG9uZyBwYWRbMjRdOwogICAg ICAgICAgICAgIH0gQjsKCnZvaWQgZmZmZiAoaW50ICosIGludCAqKTsKCnZvaWQgZ2dnZ2cgKEIg KmV2ZW50KQp7CiAgaW50IHgsIHk7CiAgc3dpdGNoKGV2ZW50LT50eXBlKQogIHsKICBjYXNlIDQ6 CiAgY2FzZSA1OgogICAgICB4ID0gZXZlbnQtPnhidXR0b24ueDsKICAgICAgeSA9IGV2ZW50LT54 YnV0dG9uLnk7CiAgICAgIGJyZWFrOwogIGNhc2UgMjoKICBjYXNlIDM6CiAgICAgIHggPSBldmVu dC0+eGtleS54OwogICAgICB5ID0gZXZlbnQtPnhrZXkueTsKICAgICAgYnJlYWs7CiAgY2FzZSA2 OgogICAgICB4ID0gZXZlbnQtPnhtb3Rpb24ueDsKICAgICAgeSA9IGV2ZW50LT54bW90aW9uLnk7 CiAgICAgIGJyZWFrOwogIGRlZmF1bHQ6CiAgICAgIHJldHVybjsKICB9CiAgZmZmZigmeCwgJnkp Owp9Cg==
next reply other threads:[~2001-08-24 0:26 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-08-24 0:26 Luc.Maisonobe [this message] 2002-04-24 15:35 rth
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=20010824071729.19507.qmail@sourceware.cygnus.com \ --to=luc.maisonobe@cnes.fr \ --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: linkBe 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).