public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/43341] New: pragma pack changes padding in struct gcov_info on 64-bit archs
@ 2010-03-12 9:15 amonakov at gcc dot gnu dot org
2010-04-21 16:44 ` [Bug gcov-profile/43341] " amonakov at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: amonakov at gcc dot gnu dot org @ 2010-03-12 9:15 UTC (permalink / raw)
To: gcc-bugs
cat <<EOF > t.c
int foo(){}
#pragma pack(1)
EOF
gcc -S -fprofile-generate t.c
grep '^\.LPBX' -A 2 t.s
.LPBX0:
.long 875574314
.quad 0
The padding ('.zero 4') between .long and .quad that correspond to the first
two fields of struct gcov_info (an int and a ptr) is gone. This makes building
Firefox with profile feedback impossible on amd64. At least gcc-4.[1345]
behave this way.
--
Summary: pragma pack changes padding in struct gcov_info on 64-
bit archs
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amonakov at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43341
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gcov-profile/43341] pragma pack changes padding in struct gcov_info on 64-bit archs
2010-03-12 9:15 [Bug gcov-profile/43341] New: pragma pack changes padding in struct gcov_info on 64-bit archs amonakov at gcc dot gnu dot org
@ 2010-04-21 16:44 ` amonakov at gcc dot gnu dot org
2010-04-21 16:45 ` amonakov at gcc dot gnu dot org
2010-04-21 16:54 ` amonakov at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: amonakov at gcc dot gnu dot org @ 2010-04-21 16:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from amonakov at gcc dot gnu dot org 2010-04-21 16:43 -------
Created an attachment (id=20455)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20455&action=view)
proposed patch
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43341
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gcov-profile/43341] pragma pack changes padding in struct gcov_info on 64-bit archs
2010-03-12 9:15 [Bug gcov-profile/43341] New: pragma pack changes padding in struct gcov_info on 64-bit archs amonakov at gcc dot gnu dot org
2010-04-21 16:44 ` [Bug gcov-profile/43341] " amonakov at gcc dot gnu dot org
@ 2010-04-21 16:45 ` amonakov at gcc dot gnu dot org
2010-04-21 16:54 ` amonakov at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: amonakov at gcc dot gnu dot org @ 2010-04-21 16:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from amonakov at gcc dot gnu dot org 2010-04-21 16:45 -------
*** Bug 43825 has been marked as a duplicate of this bug. ***
--
amonakov at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tglek at mozilla dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43341
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug gcov-profile/43341] pragma pack changes padding in struct gcov_info on 64-bit archs
2010-03-12 9:15 [Bug gcov-profile/43341] New: pragma pack changes padding in struct gcov_info on 64-bit archs amonakov at gcc dot gnu dot org
2010-04-21 16:44 ` [Bug gcov-profile/43341] " amonakov at gcc dot gnu dot org
2010-04-21 16:45 ` amonakov at gcc dot gnu dot org
@ 2010-04-21 16:54 ` amonakov at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: amonakov at gcc dot gnu dot org @ 2010-04-21 16:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from amonakov at gcc dot gnu dot org 2010-04-21 16:54 -------
(In reply to comment #1)
> Created an attachment (id=20455)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20455&action=view) [edit]
> proposed patch
>
GCC generates gcov structures at runtime, and #pragma pack(1) in the source
file affects their layout. We probably can reset the alignment in
create_coverage to avoid that. The above patch implements a different approach
-- it rearranges structure fields and manually sets alignment so that layout
does not depend on current structure packing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43341
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-21 16:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-12 9:15 [Bug gcov-profile/43341] New: pragma pack changes padding in struct gcov_info on 64-bit archs amonakov at gcc dot gnu dot org
2010-04-21 16:44 ` [Bug gcov-profile/43341] " amonakov at gcc dot gnu dot org
2010-04-21 16:45 ` amonakov at gcc dot gnu dot org
2010-04-21 16:54 ` amonakov at gcc dot gnu dot org
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).