This is the mail archive of the 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]

Re: [PATCH] Testcases gcc.c-torture/execute/20041218-2.c, gcc.dg/intmax_t-1.con arm-none-elf

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 cause was:

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.

Mark Mitchell
CodeSourcery, LLC
(916) 791-8304

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