public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/4109: undefined symbol whith -O2 on solaris 2.7 with gcc 3.0
@ 2002-04-24 15:35 rth
  0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-04-24 15:35 UTC (permalink / raw)
  To: Luc.Maisonobe, gcc-bugs, gcc-prs, nobody

Synopsis: undefined symbol whith -O2 on solaris 2.7 with gcc 3.0

State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Wed Apr 24 15:35:31 2002
State-Changed-Why:
    Fixed for gcc 3.1.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4109


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c/4109:               undefined symbol whith -O2 on solaris 2.7 with gcc 3.0
@ 2001-08-24  0:26 Luc.Maisonobe
  0 siblings, 0 replies; 2+ messages in thread
From: Luc.Maisonobe @ 2001-08-24  0:26 UTC (permalink / raw)
  To: gcc-gnats

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-24 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-24 15:35 c/4109: undefined symbol whith -O2 on solaris 2.7 with gcc 3.0 rth
  -- strict thread matches above, loose matches on Subject: below --
2001-08-24  0:26 Luc.Maisonobe

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).