Re: failure due to compiler?

kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
4 Jul 1996 15:30:17 -0400

          From comp.compilers

Related articles
failure due to compiler? resler@liberty.mas.vcu.edu (1996-07-03)
Re: failure due to compiler? kanze@lts.sel.alcatel.de (1996-07-04)
Re: failure due to compiler? gclind01@starbase.spd.louisville.edu (1996-07-07)
Re: failure due to compiler? ian@five-d.com (1996-07-07)
failure due to compiler? flake@elda.demon.co.uk (1996-07-09)
Re: failure due to compiler? dennis@netcom.com (1996-07-10)
Re: failure due to compiler? dennis@netcom.com (1996-07-10)
Re: failure due to compiler? grout@polestar.csrd.uiuc.edu (1996-07-10)
[34 later articles]
| List of all articles for this month |

From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
Newsgroups: comp.compilers
Date: 4 Jul 1996 15:30:17 -0400
Organization: GABI Software, Sarl.
References: 96-07-035
Keywords: errors, C++

resler@liberty.mas.vcu.edu (Dan Resler) writes:


|> I am looking for pointers or references to descriptions where software
|> has compiled without error and later failed due to compiler-introduced
|> errors in the resultant program. In other words, the source was deemed
|> to be error free but the compiler botched the code generation. Any
|> help would be appreciated; thanks.


Are you looking for papers and statistics, or just anecdotes. I work in C++
at present, and about half of the errors I find in compiled code are due to
compiler errors; most of the time, it is a case of inserting the wrong
function in the vtbl (in the presence of multiple inheritance), but not
calling a destructor, or calling it in a branch where the object wasn't
constructed, is also frequent. The vtbl errors are the worst: calling a
base class function on the base class (rather than the derived class
function on the derived class) will often result in only a subtle change in
the semantics of the class, and not a core dump or anything drastic. (And
I've seen this problem in at least three completely different compilers.)


Amongst the worst other problems I've seen:


- Early versions of g++ (at least through 2.2.2) didn't reserve enough
memory for certain temporaries, which resulted in overlapping objects.


- Early versions of Zortech C++ sometimes failed to push certain
"hidden" parameters (pointer to a class type return value?) onto the
stack. (The callee, of course, accessed them anyway:-).)


- And one C compiler I used (admittedly pre-production, and a long time
ago) changed the constant 127 to -1 in a char context. (More
generally, the largest positive value in any integral context ended up
-1 when used as a constant.)
--
James Kanze Tel.: (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
--


Post a followup to this message

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