This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: is this test case OK?


Recently, I ran into a bug in the merge of the trunck with the
gupc branch: a statement in c-typeck.c in the trunk had inadvertently
been deleted, and this caused a regression on IA64.

The attached test case detects the regression (that user-requested
16 byte alignment is handled correctly).  I'll follow-up with an RFA
if this test case is considered well-formed, useful, and not duplicative.

Three questions:
1) Is the use of __alignof__ acceptable?
2) Is the cast of an address to (unsigned long int)
suitably portable?  If not, is there another recommended
method for making this check?
3) Would it be reasonable to place this test in
testsuite/gcc.dg?

I'm concerned that the final 'if' which tests that the address
is 16 byte aligned might not be portable enough across all
targets.  For example, does a 16 bit word target processor
have to honor the 16 byte alignment, or is it a "best efforts"
sort of thing?

thanks,
- Gary

Attachment: align-3.c
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]