From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 5 Jan 93 18:15:36 GMT From: pa.dec.com!cnam.cnam.fr!bortz@decuac.dec.com (Stephane Bortzmeyer) Subject: Crash your compiler (Was: Ada Readability, Book Reference) Message-ID: <199301051815.AA06597@cnam.cnam.fr> List-Id: In article <1993Jan5.115003.29978@sei.cmu.edu>, progers@ajpo.sei.cmu.edu (Pat Rogers) writes: > In article <1993Jan4.174424.5699@seas.gwu.edu> mfeldman@seas.gwu.edu (Michael Feldman) writes: ... > >This is interesting. I take it, then, that 1.0/3.0 will be flagged by > >the compiler, because - unless a rational representation is being > >used, which is always possible, I suppose - there aren't enough bits > >in a megabyte to evaluate it exactly. Do compilers use rationals > >for this? I'll be back later, after a test or two of this! ... > About seven years ago I saw this program (I think by John Squires) on > info-ada (this is a reconstruction from memory). See how long it takes > your compiler to give up on it -- use a batch queue if you can, especially > on a virtual memory machine. If it does eventually compile, you can just > add lines until it won't... Here are some results: 1) Sony/Risc under News/OS (sort of Unix BSD) with the Alsys/Systeam compiler: % time ada.c ../killer.ada Compiling: /users/labinf/bortz/ada/essais/killer.ada line 0, col 1, restriction: Overflow of digit pool in constant table compiler error at end of compilation unit: Compilation in SEMANTIC aborted PROCEDURE KILLER **** Number of Errors : 2 29.7u 0.5s 0:39.54 76.6% 337+196k 72+9io 354pf+0w (Thirty CPU seconds before giving up.) 2) DECstation under Ultrix (sort of Unix BSD) with the DEC compiler: % time ada.c ../killer.ada (Twenty minutes of CPU time later, the experimentator went to bed.) Does anyone have such a collection of "compiler killers"? Stephane Bortzmeyer Conservatoire National des Arts et Metiers bortzmeyer@cnam.cnam.fr Laboratoire d'Informatique 292, rue Saint-Martin tel: +33 (1) 40 27 27 31 75141 Paris Cedex 03 fax: +33 (1) 40 27 27 72 France "C'est la nuit qu'il est beau de croire a la lumiere." E. Rostand