This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/8395: gcc 2.95.4 and 3.2 generate wrong code for double onintel
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Marco Bernardo <bernardo at sti dot uniurb dot it>
- Cc: Bruce Allen <ballen at gravity dot phys dot uwm dot edu>, Bruce Allen <ballen at aei dot mpg dot de>, <gcc-gnats at gcc dot gnu dot org>, <gcc-bugs at gcc dot gnu dot org>, <nobody at gcc dot gnu dot org>
- Date: Mon, 4 Nov 2002 17:02:43 +0000 (GMT)
- Subject: Re: c/8395: gcc 2.95.4 and 3.2 generate wrong code for double onintel
On Mon, 4 Nov 2002, Marco Bernardo wrote:
> However, for a person doing research on the formal semantics of programming
> languages, it is difficult to accept that two differently compiled versions
> of the same sequential program return two different values for the same input.
> The compiler should not be free to alter the semantics of a sequential program,
> i.e. the program output for a given input! Some consistency should be kept.
You should read Norrish's thesis (link from the GCC readings page) which
gives a (imperfect) formal model in HOL of the semantics of a subset of
C90. There are many areas where the program output for a given input is
only partially constrained.
--
Joseph S. Myers
jsm28@cam.ac.uk