Peter,
OTOH, if you observe the same behaviour with all optimization turned *off* (i.e. you do not give the `-O' switch to the call to `gpc'), it *is* a bug, not in code generation but in GPC's generation of debugging information.
Please let us know which is the case.
-O does not change anything in debugging the little code. However, my actual code is not giving 1=1, but instead something like
repeat for Ibalaye_ligne:=1 to Ilargeur_pattern do if (Pbalaye_fichier^.contenu[Ibalaye_ligne]='*') or (Pbalaye_fichier^.contenu[Ibalaye_ligne]='O') then begin
univers.courant[Ixinstall_pattern+Ibalaye_ligne][Iyinstall_pattern]:=True; new(Pajoute_cellule); Pajoute_cellule^.x:=Ixinstall_pattern; Pajoute_cellule^.y:=Iyinstall_pattern; Pajoute_cellule^.suivante:=NIL; Pbalaye_liste_cellule^.suivante:=Pajoute_cellule; Pbalaye_liste_cellule:=Pajoute_cellule; end; Iyinstall_pattern:=Iyinstall_pattern+1; Pbalaye_fichier:=Pbalaye_fichier^.suivante; until Pbalaye_fichier^.suivante=NIL; end;
where GPC should not simplify anything as there is nothing to simplify.
If it is only debugging problem, the problem should go away when putting the breakpoint far away, isn't it? And it does not!
(sorry Peter if I mail directly to you, it is to speed up the mailing)