Explorar el Código

* new test
* fix compilation on i386

git-svn-id: trunk@6861 -

florian hace 18 años
padre
commit
4fc85cb084
Se han modificado 3 ficheros con 14 adiciones y 2 borrados
  1. 1 0
      .gitattributes
  2. 2 2
      compiler/x86/nx86inl.pas
  3. 11 0
      tests/webtbs/tw8525.pp

+ 1 - 0
.gitattributes

@@ -8116,6 +8116,7 @@ tests/webtbs/tw8391.pp svneol=native#text/plain
 tests/webtbs/tw8434.pp svneol=native#text/plain
 tests/webtbs/tw8462.pp svneol=native#text/plain
 tests/webtbs/tw8513.pp svneol=native#text/plain
+tests/webtbs/tw8525.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 2 - 2
compiler/x86/nx86inl.pas

@@ -197,9 +197,9 @@ implementation
 
      function tx86inlinenode.first_trunc_real: tnode;
        begin
-         if (cs_opt_size in current_settings.optimizerswitches) and
+         if (cs_opt_size in current_settings.optimizerswitches)
 {$ifdef x86_64}
-           not(use_sse(left.resultdef))
+           and not(use_sse(left.resultdef))
 {$endif x86_64}
            then
            result:=inherited

+ 11 - 0
tests/webtbs/tw8525.pp

@@ -0,0 +1,11 @@
+{$mode objfpc}{$H+}
+
+var
+  x, y: integer;
+begin
+  x:=1;
+  y := Round(x);
+  if y<>1 then
+    halt(1);
+  writeln('ok');
+end.