C Torture Tests

reinders@iwarp.intel.com (James Reinders)
Fri, 2 Mar 90 19:32:17 GMT

          From comp.compilers

Related articles
C Torture Tests reinders@iwarp.intel.com (1990-03-02)
| List of all articles for this month |

Newsgroups: comp.compilers
From: reinders@iwarp.intel.com (James Reinders)
Keywords: C, testing
Organization: Intel iWarp, Beaverton, Oregon, USA
Distribution: usa
Date: Fri, 2 Mar 90 19:32:17 GMT

I got a copy of the "C torture tests" recently.

Could someone please tell me who wrote these tests, and where they are
"officially" distributed from? The copy I got was not an original.

The tests have the following problems:

test 241 - assumes that a compiler will not abort if an integer constant is
    too large (will not even fit in a "long"). This is unfortunate.

test 243 - will print "er1" and "er4" unless the compiler is "partially
    ANSI." This is bad considering the tests are billed as "K&R" tests. The
    key is `\a', which a pure K&R compiler will consider to be 'a' and an ANSI
    compiler will consider to be a BELL (audible alert).

test s81 - prints "Register count for ... is unreliable" if your optimizer
    is worth anything at all. The "problem" if that a good optimizer will
    promote variables to registers even if they are not declared "register."

- james

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.