473,503 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A C test suite (was: Opinions on Rowley CrossWorks for ARM)

David Brown wrote:
Chris Hills wrote:
>Paul Curtis <pl*@rowley.co.ukwrites
.... snip ...
>>>
You can't argue with an BSI or ISO test certificate, no. Can
you point me to such a certificate for the compilers you
advocate? One of them?

You can start with the Plum Hall and Perennial test suites?

I tried a quick google for "Plum Hall IAR", and looked at the
first link:

http://www.plumhall.com/cqs/tr/trackrecord.html

It would appear that IAR is a customer of Plum Hall, as is Red Hat.
That by no means implies that gcc is certified by Plum Hall, but it
does look like they take test suite testing seriously.

Another interesting find from google:

http://gcc.gnu.org/ml/gcc/1998-07/msg00656.html
>Off line I should be interested in a serious discussion on compiler
testing.
The problem with the gcc test suite is that it is geared to the gcc
'standard', rather than the ISO standard. A test suite should be
open-source, and there should probably be several of them (with
some commonality), one each for C90, C99, and C0X. The tests
should be clearly tied to the standard. There are several classes
of tests needed, i.e. conformance, detection of errors, and
quality. The last will be controversial.

The unfortunate experience with the Pascal test-suite is a
warning. This was excellent, but handed over to some British firm
(I forget the name) and basically lost. It included portable means
of selecting individual tests, and of running an overall check.
Thus GPL licencing is essential.

The results should be very useful, even when systems fail. For
example, where a compiler is aimed at a PIC many things are simply
not feasible. Running the suite would point out those constructs
to the user, who can then avoid using them. Maybe a sourceforge
project would be appropriate? Such a suite would obviously be poor
at the start, but should mature. The first task would be a method
of organizing the tests. The Pascal suite is an excellent
example. There should be no pressure to include C++ in the
testing, that is an entirely separate issue (and language).

Xposted from comp.arch.embedded to comp.lang.c and comp.std.c

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
Nov 3 '06 #1
17 2504


CBFalconer wrote:
For example, where a compiler is aimed at a PIC many things are simply
not feasible.
I am curious, what for example?

w..

Nov 4 '06 #2

Walter Banks wrote:
CBFalconer wrote:
For example, where a compiler is aimed at a PIC many things are simply
not feasible.

I am curious, what for example?

w..
Some PICs only have three levels of stack.

Leon

Nov 4 '06 #3
On 4 Nov 2006 00:30:24 -0800, "Leon" <le*********@bulldoghome.com>
wrote:
>
Walter Banks wrote:
>CBFalconer wrote:
For example, where a compiler is aimed at a PIC many things are simply
not feasible.

I am curious, what for example?

w..

Some PICs only have three levels of stack.
The only problem I can think of is saving the (code space) return
address into the data address space RAM.

Usually even Harvard architecture have some means of transferring data
between code and data space, if these PICs do not have such feature,
implementing C would be problematic. As long as an indirect jump can
be performed, the situation is not hopeless.

Paul

Nov 4 '06 #4
Paul Keinanen wrote:
"Leon" <le*********@bulldoghome.comwrote:
>Walter Banks wrote:
>>CBFalconer wrote:

For example, where a compiler is aimed at a PIC many things are
simply not feasible.

I am curious, what for example?

Some PICs only have three levels of stack.

The only problem I can think of is saving the (code space) return
address into the data address space RAM.

Usually even Harvard architecture have some means of transferring
data between code and data space, if these PICs do not have such
feature, implementing C would be problematic. As long as an
indirect jump can be performed, the situation is not hopeless.
Not a PIC. The only access to the return stack is the return
instruction. As I set, not feasible. And there is not enough
memory to allow creating an interpreter.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
Nov 4 '06 #5


CBFalconer wrote:
The only access to the return stack is the return
instruction. As I set, not feasible. And there is not enough
memory to allow creating an interpreter.
You mean something like the parallax basic stamp.
Nov 4 '06 #6


Leon wrote:
>
For example, where a compiler is aimed at a PIC many things are simply
not feasible.
I am curious, what for example?

Some PICs only have three levels of stack.
At least one C compiler built a soft stack on those parts. We chose to
seem that as a part limit with aggressive function chaining.
Nov 4 '06 #7


Paul Keinanen wrote:
I am curious, what for example?

The only problem I can think of is saving the (code space) return
address into the data address space RAM.
Close it can be done but it requires some application planning.
Usually even Harvard architecture have some means of transferring data
between code and data space, if these PICs do not have such feature,
implementing C would be problematic.
Data can be transferred from ROM to data space and in some parts
the ROM can be written from the application parts

w..
Nov 4 '06 #8
Leon wrote:
>
For example, where a compiler is aimed at a PIC many things are simply
not feasible.
I am curious, what for example?

Some PICs only have three levels of stack.
At least one C compiler built a soft stack on those parts. We chose to
see that as a part limit and partly compensated with aggressive function
chaining.


Nov 4 '06 #9
Paul Keinanen wrote:
I am curious, what for example?

The only problem I can think of is saving the (code space) return
address into the data address space RAM.
Close it can be done but it requires some application planning.
Usually even Harvard architecture have some means of transferring data
between code and data space, if these PICs do not have such feature,
implementing C would be problematic.
Data can be transferred from ROM to data space and in some parts
the ROM can be written from the application parts

w..


Nov 4 '06 #10
In article <45***************@bytecraft.com>, wa****@bytecraft.com
says...
>

CBFalconer wrote:
For example, where a compiler is aimed at a PIC many things are simply
not feasible.

I am curious, what for example?
I seem to recall some of the minimum translation requirements would be
an issue. Isn't there a minimum maximal length string restriction?

Robert

--
Posted via a free Usenet account from http://www.teranews.com

Nov 4 '06 #11
In article <45***************@yahoo.com>, cb********@yahoo.com says...
The problem with the gcc test suite is that it is geared to the gcc
'standard', rather than the ISO standard. A test suite should be
open-source, and there should probably be several of them (with
some commonality), one each for C90, C99, and C0X. The tests
should be clearly tied to the standard. There are several classes
of tests needed, i.e. conformance, detection of errors, and
quality. The last will be controversial.

The unfortunate experience with the Pascal test-suite is a
warning. This was excellent, but handed over to some British firm
(I forget the name) and basically lost. It included portable means
of selecting individual tests, and of running an overall check.
Thus GPL licencing is essential.
I rather like the idea. Does this mean you are volunteering to start
it? :)

Robert

--
Posted via a free Usenet account from http://www.teranews.com

Nov 4 '06 #12
Robert Adsett wrote:
In article <45***************@yahoo.com>, cb********@yahoo.com says...
>The problem with the gcc test suite is that it is geared to the gcc
'standard', rather than the ISO standard. A test suite should be
open-source, and there should probably be several of them (with
some commonality), one each for C90, C99, and C0X. The tests
should be clearly tied to the standard. There are several classes
of tests needed, i.e. conformance, detection of errors, and
quality. The last will be controversial.

The unfortunate experience with the Pascal test-suite is a
warning. This was excellent, but handed over to some British firm
(I forget the name) and basically lost. It included portable means
of selecting individual tests, and of running an overall check.
Thus GPL licencing is essential.

I rather like the idea. Does this mean you are volunteering to start
it? :)
If I were 20 years younger and in good health, I would. As it is I
can only offer advice. Been a lot a places, and seen a lot of
mistakes. The health can, I hope, be fixed.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
Nov 4 '06 #13
In article <45***************@yahoo.com>, cb********@yahoo.com says...
Robert Adsett wrote:
I rather like the idea. Does this mean you are volunteering to start
it? :)

If I were 20 years younger and in good health, I would. As it is I
can only offer advice. Been a lot a places, and seen a lot of
mistakes. The health can, I hope, be fixed.
Here's hoping. Been through, a thankfully light, dose of that myself.

Robert

--
Posted via a free Usenet account from http://www.teranews.com

Nov 4 '06 #14
CBFalconer wrote:
Robert Adsett wrote:
>In article <45***************@yahoo.com>, cb********@yahoo.com says...
>>The problem with the gcc test suite is that it is geared to the gcc
'standard', rather than the ISO standard. A test suite should be
open-source, and there should probably be several of them (with
some commonality), one each for C90, C99, and C0X. The tests
should be clearly tied to the standard. There are several classes
of tests needed, i.e. conformance, detection of errors, and
quality. The last will be controversial.

The unfortunate experience with the Pascal test-suite is a
warning. This was excellent, but handed over to some British firm
(I forget the name) and basically lost. It included portable means
of selecting individual tests, and of running an overall check.
Thus GPL licencing is essential.
I rather like the idea. Does this mean you are volunteering to start
it? :)

If I were 20 years younger and in good health, I would. As it is I
can only offer advice. Been a lot a places, and seen a lot of
mistakes. The health can, I hope, be fixed.
We don't get younger so you can forget that one. :-) I do hope you
regain your good health. Hang in there. Older is usually better, when
you consider the alternative.

--
Joe Wright
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Nov 5 '06 #15
Robert Adsett said:
In article <45***************@bytecraft.com>, wa****@bytecraft.com
says...
>>
CBFalconer wrote:
For example, where a compiler is aimed at a PIC many things are simply
not feasible.

I am curious, what for example?

I seem to recall some of the minimum translation requirements would be
an issue. Isn't there a minimum maximal length string restriction?
In C90, the implementation must support a minimum of 509 characters in a
logical source line and in a character string literal. 509 is also the
minimum value for the maximum number of characters produced by any single
fprintf conversion.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Nov 5 '06 #16


Robert Adsett wrote:
CBFalconer wrote:
For example, where a compiler is aimed at a PIC many things are simply
not feasible.
I am curious, what for example?

I seem to recall some of the minimum translation requirements would be
an issue. Isn't there a minimum maximal length string restriction?
Good point combined with Richard's comment on fprintf. It is possible
to implement around this limit on processors like the PIC but I do not
know of anyone (including us) who have done so..

w..

Nov 5 '06 #17
Greetings,

CBFalconer wrote:
Paul Keinanen wrote:
>>"Leon" <le*********@bulldoghome.comwrote:
>>>Walter Banks wrote:

CBFalconer wrote:
>For example, where a compiler is aimed at a PIC many things are
>simply not feasible.

I am curious, what for example?

Some PICs only have three levels of stack.

The only problem I can think of is saving the (code space) return
address into the data address space RAM.

Usually even Harvard architecture have some means of transferring
data between code and data space, if these PICs do not have such
feature, implementing C would be problematic. As long as an
indirect jump can be performed, the situation is not hopeless.


Not a PIC. The only access to the return stack is the return
instruction. As I set, not feasible. And there is not enough
memory to allow creating an interpreter.
Indirect calls and/or jumps are trivial on the 16 (& I think 12 & 14)
series so I don't see the problem. It's also fairly trivial to ignore
the call/return stack by passing the return address as a hidden
parametert to a function.

About the only problem I see is with only a single indirect register
allowing recursion is difficult.
>

--
Kyle A. York
Sr. Subordinate Grunt
DSBU
Nov 6 '06 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2039
by: fo | last post by:
Hi, I want create a page bit like an personality test or take input from users then display results based on the input and criteria required from the mysql database . For example; If you are...
467
21184
by: mike420 | last post by:
THE GOOD: 1. pickle 2. simplicity and uniformity 3. big library (bigger would be even better) THE BAD:
12
3803
by: Jan Roland Eriksson | last post by:
I have worked some more on this suggested new mFAQ version trying to get all user input to blend into the text. Another review by the NG would be welcome. ===== Archive-name:...
5
3121
by: Jan Roland Eriksson | last post by:
Some more fine tuning and inclusion of last suggested text from regulars has been done to this test post #4 of the mFAQ. As usual, rip it up anywhere you feel that it's appropriate to do so. ...
0
1750
by: Phlip | last post by:
C++ newsgroupies: I wrote a parser to solve math expressions like "3.0 ^(4 - 5)", or "3 / 8". Below my sig is test.h, the file containing a tiny test framework. Using it and Test-Driven...
18
1840
by: Scott David Daniels | last post by:
There has been a bit of discussion about a way of providing test cases in a test suite that _should_ work but don't. One of the rules has been the test suite should be runnable and silent at every...
4
2705
by: Spiros Bousbouras | last post by:
Is there a suite to verify that a C compiler understands the language correctly and produces correct code ? If not why not ? There is such a suite (not associated with any specific implementation)...
2
2015
by: prem | last post by:
Hi, Anybody know if there are any *FREE* ANSI C test suite for C/C++ for Compiler available? Any link/pointers is appreciated /Prem
4
2605
by: oksid | last post by:
Hello, I'm writing a C99 preprocessor and I want to check its compliance with the ISO standard. I would like to know what's the best C99 test suite ? GCC seems to have a large set of test...
1
7011
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5596
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4689
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
747
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.