[comp.compilers] C Torture Tests

reinders@iwarp.intel.com (James Reinders) (03/04/90)

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
-- 
Send compilers articles to compilers@esegue.segue.boston.ma.us
{spdcc | ima | lotus}!esegue.  Meta-mail to compilers-request@esegue.
Please send responses to the author of the message, not the poster.