This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Testcases gcc.c-torture/execute/20041218-2.c, gcc.dg/intmax_t-1.con arm-none-elf
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Julian Brown <julian at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Paul Brook <paul at codesourcery dot com>
- Date: Fri, 13 May 2005 00:42:01 -0700
- Subject: Re: [PATCH] Testcases gcc.c-torture/execute/20041218-2.c, gcc.dg/intmax_t-1.con arm-none-elf
- References: <4280DB94.firstname.lastname@example.org>
Julian Brown wrote:
This patch fixes two testsuite glitches on arm-none-elf. The patch was
made against the 4.0 branch, but the problems still apply on head.
The first is gcc.c-torture/execute/20041218-2.c, which wrongly assumes
no padding will be applied to a char array inside a struct (such an
entity is padded to 32-bits on most ARM targets). I've added
__attribute__((packed)) here which lets the test pass, but I'm not sure
if that's the right thing to do (i.e., whether that would still trigger
the problem the testcase was supposed to check for in the first place).
It took me a little searching to track down the reason this test was
added, in part because there seems to be no ChangeLog entry for it. The
So, your change is fine; the test just wants to make sure that the size
doesn't change after the "n++" expression is evaluated.
The second assumes presence of <inttypes.h>, which isn't there on
arm-none-elf, so I've added *arm*-*-*elf* to the list of targets which
are skipped for that test.
Yes, that's fine. Someone may want to do something more sophisticated
later to autodetect <inttypes.h>, but your approach is fine for now.
Please commit to 4.0 and mainline.