Page MenuHomePhabricator

[clang, test] Fix Clang :: Headers/max_align.c on 64-bit SPARC

Authored by ro on Jul 10 2019, 6:53 AM.



Clang :: Headers/max_align.c currently FAILs on 64-bit SPARC:

error: 'error' diagnostics seen but not expected: 
  File /vol/llvm/src/clang/dist/test/Headers/max_align.c Line 12: static_assert failed due to requirement '8 == _Alignof(max_align_t)' ""
1 error generated.

This happens because SuitableAlign isn't defined for SPARCv9 unlike SPARCv8
(which uses the default of 64 bits). gcc's sparc/sparc.h has

#define BIGGEST_ALIGNMENT (TARGET_ARCH64 ? 128 : 64)

This patch sets SuitableAlign to match and updates the corresponding testcase.

Tested on sparcv9-sun-solaris2.11 . Ok for trunk?

Diff Detail

Event Timeline

ro created this revision.Jul 10 2019, 6:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2019, 6:53 AM
ro added a reviewer: jyknight.Jul 16 2019, 1:11 AM

Ping? It's been a week.

ro added a comment.Jul 23 2019, 4:18 AM

Ping^2? It's been two weeks now.

jyknight accepted this revision.Jul 23 2019, 6:37 AM


This revision is now accepted and ready to land.Jul 23 2019, 6:37 AM
This revision was automatically updated to reflect the committed changes.