FYI,
With this program I get the same compilation error on SUN Sparc Solaris 10 and a different error on x86 Linux (Debian), with two different versions of gpc. See details below. Also if I remove the {$mac-pascal} directive the program compiles and gives the expected result.
SUN Sparc Solaris 10:
<gnu-pascal> gpc -g -o modbug modbug.pas modbug.pas: In main program: modbug.pas:9: internal compiler error: in simplify_gen_subreg, at simplify-rtx.c:3491 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://www.gnu-pascal.de/todo.html for instructions.
<gnu-pascal> gpc --version gpc 20051116, based on gcc-3.4.4 Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Linux: pascal:/home/gnu-port/tests$ gpc -g -o modbug modbug.pas modbug.pas: In main program: modbug.pas:9: internal compiler error: in copy_to_mode_reg, at explow.c:667 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://www.gnu-pascal.de/todo.html for instructions. For Debian GNU/Linux specific bug reporting instructions, see URL:file:///usr/share/doc/gcc-3.4/README.Bugs.
pascal:/home/gnu-port/tests$ gpc --version gpc 20050331, based on gcc-3.4.5 20050821 (prerelease) (Debian 3.4.4-8) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Regards
Pascal Viandier
-----Message d'origine----- De : gpc-owner@gnu.de [mailto:gpc-owner@gnu.de] De la part de Gale Paeper Envoyé : October 04, 2007 03:49 À : gpc@gnu.de Objet : Re: Mod operator issue
On Oct 3, 2007, at 12:39 AM, Adriaan van Os wrote:
The following two programs fail on i386-apple-darwin when using gpc version 20051116 with gcc-3.4.5, but not when using gpc version 20070904 with gcc-4.1.2. This was reported by Stéphane Nicolet on the mac-pascal mailiong list. Does someone remember if this is a back-end or front-end problem ?
{$mac-pascal} program modbug; var a,b: integer; c: boolean; begin a := 22; b := 12; c:= ((a - 15) mod b) = (b-1) end.
I'll add to Ardiaan's failing compiler list with powerpc-apple- darwin8 with gpc version 20051116, based on gcc-3.4.5 and gpc version 20060325, based on gcc-3.4.5.
Also got the same non-failure result as Adriaan did with gpc version 20070904, based on gcc-4.1.2 with powerpc-apple-darwin8.
Details are below.
Gale Paeper gpaeper@empirenet.com
grp$ /Developer/Pascal/gpc345u2/bin/gpc -c modbug.pas modbug.pas: In main program: modbug.pas:9: internal compiler error: in simplify_gen_subreg, at simplify-rtx.c:3491 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://www.gnu-pascal.de/todo.html for instructions.
grp$ /Developer/Pascal/gpc345u2/bin/gpc -v Reading specs from /Developer/Pascal/gpc345u2/lib/gcc/powerpc-apple- darwin8/3.4.5/specs Configured with: ../gcc-3.4.5/configure --enable-languages=pascal,c -- enable-threads=posix --target=powerpc-apple-darwin8 --host=powerpc- apple-darwin8 --build=powerpc-apple-darwin8 --prefix=/Developer/ Pascal/gpc345u2 Thread model: posix gpc version 20051116, based on gcc-3.4.5
grp$ gpc -c modbug.pas modbug.pas: In main program: modbug.pas:9: internal compiler error: in simplify_gen_subreg, at simplify-rtx.c:3491 Please submit a full bug report, with preprocessed source if appropriate. See URL:http://www.gnu-pascal.de/todo.html for instructions.
grp$ gpc -v Reading specs from /Developer/Pascal/gpc345u2d1/lib/gcc/powerpc-apple- darwin8/3.4.5/specs Configured with: ../gcc-3.4.5/configure --enable-languages=pascal,c -- enable-threads=posix --target=powerpc-apple-darwin8 --host=powerpc- apple-darwin8 --build=powerpc-apple-darwin8 --prefix=/Developer/ Pascal/gpc345u2d1 Thread model: posix gpc version 20060325, based on gcc-3.4.5
grp$ /Developer/Pascal/gpc412u1/bin/gpc -c modbug.pas
grp$ /Developer/Pascal/gpc412u1/bin/gpc -v Using built-in specs. Configured with: ../gcc-4.1.2/configure --enable-languages=pascal,c -- enable-threads=posix --target=powerpc-apple-darwin8 --host=powerpc- apple-darwin8 --build=powerpc-apple-darwin8 --prefix=/Developer/ Pascal/gpc412u1 Thread model: posix gpc version 20070904, based on gcc-4.1.2