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

Reply via email to