-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
Labels
ABIApplication Binary InterfaceApplication Binary InterfacebugzillaIssues migrated from bugzillaIssues migrated from bugzillacclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partydiverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue
Description
| Bugzilla Link | 42554 |
| Version | 8.0 |
| OS | Linux |
| Reporter | LLVM Bugzilla Contributor |
| CC | @topperc,@DougGregor,@RKSimon,@zygoloid |
Extended Description
When compiled -march=native (on znver1) with gcc and clang I get the following:
- gcc 9.1.1 20190503 (Red Hat 9.1.1-1)
alignof(max_align_t)=16 __BIGGEST_ALIGNMENT__=32 malloc() align=16
__SSE__ __AVX__ __AVX2__
- clang 8.0.0 (Fedora 8.0.0-1.fc30)
(4.2.1 Compatible Clang 8.0.0 (Fedora 8.0.0-1.fc30))
alignof(max_align_t)=16 __BIGGEST_ALIGNMENT__=16 malloc() align=16
__SSE__ __AVX__ __AVX2__
When compiled without -march=native, both give:
alignof(max_align_t)=16 __BIGGEST_ALIGNMENT__=16 malloc() align=16
__SSE__
My guess is that clang's __BIGGEST_ALIGNMENT__ for -march=native is a bug... except that gcc v4.2.1 predates AVX ???
FWIW: in all cases glibc malloc() aligned to 16. My reading of the glibc code tells me that its alignment is 2*sizeof(size_t), which is in fact the same as alignof(max_align_t), but is in no way related.
Metadata
Metadata
Assignees
Labels
ABIApplication Binary InterfaceApplication Binary InterfacebugzillaIssues migrated from bugzillaIssues migrated from bugzillacclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partydiverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue