GNU Pascal is a 32 bit compiler with excellent optimization algorithms (which are identically the same as those of GNU C). There are three official optimization levels, specified by the command line options `-O', `-O2', and `-O3'. Actually, this goes up to `-O6', but levels above `-O3' are experimental (as far as I know).
One example:
Program Test;
Var
A, B: Integer;
begin
A:= 3;
B:= 4;
writeln ( A + B );
end.
When GNU Pascal compiles this program with optimization, it
recognizes that the argument of writeln is the constant 7--and
optimizes away the variables A and B.
For more about optimization, see the GNU C documentation.