public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/6871: const objects shouldn't be moved to .bss
@ 2002-05-30 8:56 drepper
0 siblings, 0 replies; only message in thread
From: drepper @ 2002-05-30 8:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 6871
>Category: optimization
>Synopsis: const objects shouldn't be moved to .bss
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 30 08:56:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Ulrich Drepper
>Release: gcc CVS trunk 2002-05-29
>Organization:
>Environment:
x86 Linux
>Description:
The gcc CVS trunk contains code which moves variables which are initialized with all zeros into .bss (instead of .data). But the current gcc doesn't stop there: it also moves constants into .bss instead of .text. This is not what should happen since the .bss cannot be shared, unlike the .text.
>How-To-Repeat:
Compile the attached file with
gcc -O2 -c u.c
The variable should be in .text and not in .bss.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="u.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="u.c"
Y29uc3Qgc3RydWN0IHsKICBpbnQgYTsKICBpbnQgYjsKfSBmb28gPSB7IDAsIDAgfTsK
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-05-30 15:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-30 8:56 optimization/6871: const objects shouldn't be moved to .bss drepper
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).