On 09/10/16 01:11, Jeff Law wrote:
>> First the good news.  The unit test does actually work, but not only
>> on aarch even without -mabi=ilp32, but also on i386.  All that's
>> missing is a check that we don't get a reg/f here:
> Sweet.  This starts to touch on some of those unanswered questions --
> while 71779 was visibly only failing on aarch64, can we build tests
> which are ultimately target independent?  I suspected that would be the
> case for 71779, but whether or not that will hold in general remains to
> be seen.
>

Things can be target dependent, like Pmode, ptr_mode as in this case.
And target hooks can detect the cheat...

So I would not be surprised, that a test case like that needs really to
be verified on each arch, if it is actually able to detect the failure,
because if not it just risks a bootstrap failure nothing more.

>>
>> Maybe one last comment on your patch itself, could you please move
>> the unit test cases in extra unit test files, or even a self-test tree?
> That's one of the things we debated for quite a while earlier.  For now
> they're living in the source files which they're testing.  Whether or
> not that's best remains to be seen.
>

Yes, and for the initial version that is perfectly OK.

I would not have been able to write down the test case, but this looks
like a very powerful method.

The more examples there are the easier it will be to create new ones.

If there are going to be more test cases, it would be better to
have them separated in single files, like in the testsuite.

If there is a standard way how to link the test cases in the
back-end, like with static constructors, adding each test case
to a list, without knowing in advance which ones it will be.

Then we could boot-strap as usual, without risking a
boot-strap failure if a single test case fails.

Then when the test suite runs, it can compile 100 test cases
at a time, link that into a special cc1, and execute that,
then the next 100 test cases, and so on.  And the tests
can specify the supported target in a dg-do like target
comment.

Sorry if that has already been discussed somewhere.


Thanks
Bernd.

Reply via email to