| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 4 |
# This file is part of GNU Modula-2. |
| 5 |
# |
| 6 |
# GNU Modula-2 is free software; you can redistribute it and/or modify |
| 7 |
# it under the terms of the GNU General Public License as published by |
| 8 |
# the Free Software Foundation; either version 2, or (at your option) |
| 9 |
# any later version. |
| 10 |
# |
| 11 |
# GNU Modula-2 is distributed in the hope that it will be useful, |
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
# GNU General Public License for more details. |
| 15 |
# |
| 16 |
# You should have received a copy of the GNU General Public License |
| 17 |
# along with GNU Modula-2; see the file COPYING. If not, write to the |
| 18 |
# Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA |
| 19 |
# 02110-1301, USA. |
| 20 |
# |
| 21 |
|
| 22 |
GCC_VERSION=3.3.6 |
| 23 |
BFLAGS=-B../../../../../../../build-$GCC_VERSION/gcc/stage1/gm2 |
| 24 |
LIBS=-I.:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/$GCC_VERSION/gm2/pim |
| 25 |
DRIVER=../../../../../../../build-$GCC_VERSION/gcc/xgm2 |
| 26 |
OPTFLAGS=-O |
| 27 |
LIBRARIES=-lm |
| 28 |
|
| 29 |
if [ ! -x $DRIVER ] ; then |
| 30 |
echo "cannot find $DRIVER" |
| 31 |
exit 1 |
| 32 |
fi |
| 33 |
|
| 34 |
function compile () { |
| 35 |
rm -f a.out |
| 36 |
if ! $DRIVER $BFLAGS -v $OPTFLAGS $LIBS -Wcpp -gstabs -c $1 >& /dev/null ; then |
| 37 |
echo "failed to compile $1: compilation command: exit code" $? |
| 38 |
$DRIVER $BFLAGS $OPTFLAGS $LIBS -gstabs -c $1 |
| 39 |
$DRIVER -v $BFLAGS $OPTFLAGS $LIBS -gstabs -c $1 |
| 40 |
return |
| 41 |
fi |
| 42 |
if ! $DRIVER $BFLAGS $OPTFLAGS $LIBS -Wcpp -S -gstabs -c $1 >& /dev/null ; then |
| 43 |
echo "failed to compile $1" |
| 44 |
return |
| 45 |
fi |
| 46 |
if ! $DRIVER $BFLAGS $LIBS -Wcpp -gstabs -I. $1 $LIBRARIES >& /dev/null ; then |
| 47 |
echo "failed to link $1" |
| 48 |
fi |
| 49 |
} |
| 50 |
|
| 51 |
function doFile () { |
| 52 |
compile $1 |
| 53 |
if [ -x a.out ] ; then |
| 54 |
echo -n "$1 : " |
| 55 |
if ./a.out >& /dev/null ; then |
| 56 |
echo "passed" |
| 57 |
else |
| 58 |
echo "compiled ok, but executable, a.out, failed with exit code $?" |
| 59 |
fi |
| 60 |
fi |
| 61 |
} |
| 62 |
|
| 63 |
|
| 64 |
doFile smallset1.mod |
| 65 |
doFile smallset2.mod |
| 66 |
doFile smallset3.mod |
| 67 |
doFile smallset4.mod |
| 68 |
doFile smallset5.mod |
| 69 |
doFile smallset6.mod |
| 70 |
doFile smallset7.mod |
| 71 |
|
| 72 |
doFile largeset1.mod |
| 73 |
doFile largeset2.mod |
| 74 |
doFile largeset3.mod |
| 75 |
doFile largeset4.mod |
| 76 |
doFile largeset5.mod |
| 77 |
doFile largeset6.mod |
| 78 |
|
| 79 |
doFile setchar10.mod |
| 80 |
doFile parambool.mod |
| 81 |
doFile arraybool.mod |
| 82 |
doFile procindirect.mod |
| 83 |
doFile localvar.mod |
| 84 |
doFile proctype.mod |
| 85 |
doFile setchar11.mod |
| 86 |
doFile ptrarray.mod |
| 87 |
doFile ptrarray2.mod |
| 88 |
doFile record1.mod |
| 89 |
doFile record2.mod |
| 90 |
doFile ConvTypes.mod |
| 91 |
doFile ChanConsts.mod |
| 92 |
doFile testrecursive.mod |
| 93 |
doFile test2recursive.mod |
| 94 |
doFile testbuiltin2.mod |
| 95 |
doFile testcase.mod |
| 96 |
doFile testcase2.mod |
| 97 |
doFile testcase3.mod |
| 98 |
doFile testcase4.mod |
| 99 |
doFile trunc.mod |
| 100 |
doFile longreal.mod |
| 101 |
doFile realneg.mod |
| 102 |
doFile realneg2.mod |
| 103 |
doFile sizetype.mod |
| 104 |
doFile defset.mod |
| 105 |
doFile constset.mod |
| 106 |
doFile constset2.mod |
| 107 |
doFile constset3.mod |
| 108 |
doFile bitset2.mod |
| 109 |
doFile bitset3.mod |
| 110 |
|
| 111 |
doFile testabs.mod |
| 112 |
doFile testcap.mod |
| 113 |
doFile testodd.mod |
| 114 |
doFile testord.mod |
| 115 |
doFile bits32.mod |
| 116 |
doFile bits32i.mod |
| 117 |
doFile loopexit.mod |
| 118 |
doFile constsize.mod |
| 119 |
doFile constsize2.mod |
| 120 |
doFile impc.mod |
| 121 |
doFile impb.mod |
| 122 |
doFile impa.mod |
| 123 |
doFile impd.mod |
| 124 |
doFile impe.mod |
| 125 |
# doFile impf.mod should fail |
| 126 |
doFile impg.mod |
| 127 |
doFile imph.mod |
| 128 |
doFile impi.mod |
| 129 |
doFile impj.mod |
| 130 |
# doFile realbitscast.mod an ISO test |
| 131 |
doFile tinyimp.mod |
| 132 |
doFile impm.mod |
| 133 |
doFile impn.mod |
| 134 |
doFile impo.mod |
| 135 |
doFile testset.mod |
| 136 |
doFile convert.mod |
| 137 |
doFile longcard2.mod |
| 138 |
doFile arraydim.mod |
| 139 |
doFile multtypes.mod |
| 140 |
doFile testcard.mod |
| 141 |
doFile testcard2.mod |
| 142 |
doFile testcard3.mod |
| 143 |
doFile testcard4.mod |
| 144 |
doFile opaquetype.mod |
| 145 |
doFile testopaque3.mod |
| 146 |
doFile testchar.mod |