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]

Re: [PATCH] testsuite fixes for 16-bit targets


On Thu, Jul 05, 2007 at 07:26:00AM -0700, Ian Lance Taylor wrote:
> Rask Ingemann Lambertsen <rask@sygehus.dk> writes:
> 
> >    I don't think skipping the tests is a good idea. Properly written, the
> > test cases should of course pass. The bugs they are testing for are not
> > exactly target specific bugs.
> 
> True, but I agree with Richard that I'm not comfortable changing these
> tests in order to support the m32c target.  Making this change really
> requires looking back to see why each test case was added.  I second
> Richard's suggestion of simply skipping these tests on 16-bit targets.
> That is what we have historically done.  We're not talking about all
> that many tests here; the m32c will still be well tested.

   There are more testcase which need fixing. The patch I submitted only
covers the simple ones, and I haven't even looked at any of the C++ ones
yet. Simply skipping the test case leaves the possibility of silent
regressions on 16-bit targets, which are already lacking testing.

> >    Are we allowed to use stdint.h types in test cases? Using
> > (u)int_least32_t should do the trick.
> 
> But that would change the tests in a different way.

   How about guarding each problematic line with something like

#if INT_MAX >= 0x7fffffff
... original code here ...
#else
... modified code with long or int_least32_t here ...
#endif

?  Failing that, I prefer to go with Richard's second suggestion of creating a
duplicate, fixed test case for each problematic one, and skipping the
unmodified one on 16-bit targets.

-- 
Rask Ingemann Lambertsen


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