diff --git a/tests/tbs/tb0580.pp b/tests/tbs/tb0580.pp
index 60a4a33170..869fba09f5 100644
--- a/tests/tbs/tb0580.pp
+++ b/tests/tbs/tb0580.pp
@@ -10,7 +10,7 @@ end;
 
 
 const
-  test_expected : array[0..2{$ifdef cpux86_64}+2{$ifdef cpux86_64}] of byte = (
+  test_expected : array[0..2{$ifdef cpux86_64}+2{$endif cpux86_64}] of byte = (
     $CF,$66,$CF{$ifdef cpux86_64},$48,$cf{$endif cpux86_64});
 
 var
@@ -27,4 +27,3 @@ begin
       end;
   writeln('ok');
 end.
-end.