chillvars.ch
chillvars.exp
configure.in
+pr-5020.ch
+pr-5020.exp
Things-to-lose:
RUNTESTFLAGS =
-EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
- echo $${rootme}/../../expect/expect ; \
+EXPECT = `if [ -f $${rootme}../../../expect/expect ] ; then \
+ echo $${rootme}../../../expect/expect ; \
else echo expect ; fi`
RUNTEST_FOR_TARGET = ` \
- if [ -f $${rootme}/../../dejagnu/site.exp ] ; then \
- echo $${rootme}/../../dejagnu/runtest ; \
+ if [ -f $${rootme}../../../dejagnu/site.exp ] ; then \
+ echo $${rootme}../../../dejagnu/runtest ; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo $(RUNTEST); \
fi; \
fi`
+CFLAGS = -g
CHILLFLAGS = $(CFLAGS)
CHILL_FOR_TARGET = ` \
- if [ -f $${rootme}/../../gcc/Makefile ] ; then \
- echo $${rootme}/../../gcc/xgcc -B$${rootme}../../gcc/; \
+ if [ -f $${rootme}../../../gcc/Makefile ] ; then \
+ echo $${rootme}../../../gcc/xgcc -B$${rootme}../../../gcc/; \
else \
if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
echo gcc; \
CHILL = $(CHILL_FOR_TARGET)
CHILL_LIB = ` \
- if [ -f $${rootme}/../../gcc/ch/runtime/libchill.a ] ; then \
- echo $${rootme}/../../gcc/ch/runtime/chillrt0.o \
- $${rootme}/../../gcc/ch/runtime/libchill.a; \
+ if [ -f $${rootme}../../../gcc/ch/runtime/libchill.a ] ; then \
+ echo $${rootme}../../../gcc/ch/runtime/chillrt0.o \
+ $${rootme}../../../gcc/ch/runtime/libchill.a; \
else \
echo -lchill; \
fi`
GDB = ` \
- if [ -f $${rootme}/../gdb ] ; \
- then echo $${rootme}|sed -e 's@/[^/]*$$@@'|sed -e 's@$$@/gdb@' ; \
+ if [ -f $${rootme}../../gdb ] ; \
+ then echo $${rootme}../../gdb; \
else echo gdb; \
fi`
#### host, target, and site specific Makefile frags come in here.
-EXECUTABLES = chillvars
+EXECUTABLES = chillvars.exe pr-5020.exe pr-5022.exe
all: $(EXECUTABLES)
-chillvars: chillvars.o
- $(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o chillvars chillvars.o $(CHILL_LIB) $(LIBS)
+.SUFFIXES: .ch .exe
-chillvars.o: chillvars.ch
- $(CHILL_FOR_TARGET) $(CHILLFLAGS) -fspecial_UC -c $(srcdir)/chillvars.ch
+.o.exe:
+ $(CHILL_FOR_TARGET) $(CHILLFLAGS) $(LDFLAGS) -o $*.exe $*.o $(CHILL_LIB) $(LIBS)
+
+.ch.o:
+ $(CHILL_FOR_TARGET) $(CHILLFLAGS) -fspecial_UC -c $<
.NOEXPORT:
INFODIRS=doc
installcheck:
check: site.exp all just-check
just-check:
- rootme=`pwd`; export rootme; \
- srcdir=${srcdir} ; export srcdir ; \
- EXPECT=${EXPECT} ; export EXPECT ; \
- if [ -f $${rootme}/../../expect/expect ] ; then \
- TCL_LIBRARY=$${srcdir}/../../tcl/library ; \
- export TCL_LIBRARY ; fi ; \
- $(RUNTEST_FOR_TARGET) $(RUNTESTFLAGS) --tool gdb GDB=$(GDB) --srcdir $(srcdir)
+ tests=`cd ${srcdir}; echo *.exp` ; \
+ rootme=`pwd`/; export rootme; \
+ cd .. ; \
+ $(MAKE) just-check RUNTESTFLAGS="${RUNTESTFLAGS} $${tests}" \
+ GDB=${GDB} EXPECT=${EXPECT}
clean mostlyclean:
-rm -f *~ core *.o a.out xgdb *.x $(EXECUTABLES)
}
send "$sendthis\n"
expect {
- -re ".*Invalid syntax in expression.*$prompt $" {
+ -re ".*A .* in expression.*\\.*$prompt $" {
incr passcount
return 1
}
booleans ();
END;
-
-PR_5020: MODULE
- dummy_pr_5020: PROC ();
- END;
- NEWMODE x = STRUCT (l LONG, b BOOL);
-
- DCL y ARRAY ('a':'b') x;
-
- y('a').l := 10;
- y('a').b := TRUE;
- y('b').l := 111;
- y('b').b := FALSE;
- dummy_pr_5020 ();
-END;
# haven't tried to compile one, or the compilation failed for some reason.
# In either case, just notify the user and skip the tests in this file.
-set binfile "chillvars"
+set binfile "chillvars.exe"
set srcfile $binfile.ch
if ![file exists $objdir/$subdir/$binfile] then {
- if $all_flag then {
- warning "$binfile does not exist; tests suppressed."
- }
+ warning "$binfile does not exist; tests suppressed."
} else {
do_tests
}
--- /dev/null
+
+PR_5020: MODULE
+ dummy_pr_5020: PROC ();
+ END;
+ NEWMODE x = STRUCT (l LONG, b BOOL);
+ NEWMODE aset = SET (aa, bb);
+
+ DCL y ARRAY ('a':'b') x;
+ DCL setarr ARRAY (aset) x;
+ DCL intarr ARRAY(10:11) x;
+ DCL boolarr ARRAY (BOOL) x;
+
+ y('a').l, setarr(aa).l, intarr(10).l, boolarr(FALSE).l := 10;
+ y('a').b, setarr(aa).b, intarr(10).b, boolarr(FALSE).b := TRUE;
+ y('b').l, setarr(bb).l, intarr(11).l, boolarr(TRUE).l := 111;
+ y('b').b, setarr(bb).b, intarr(11).b, boolarr(TRUE).b := FALSE;
+
+ dummy_pr_5020 ();
+END;
global prompt
runto dummy_pr_5020
gdb_test_exact "print y" \
- {= [ ('a') [.l: 10, .b: TRUE], ('b') [.l: 111, .b: FALSE]]}
+ {= [('a'): [.l: 10, .b: TRUE], ('b'): [.l: 111, .b: FALSE]]}
+ gdb_test_exact "print boolarr" \
+ {= [(FALSE): [.l: 10, .b: TRUE], (TRUE): [.l: 111, .b: FALSE]]}
+ gdb_test_exact "print intarr" \
+ {= [(10): [.l: 10, .b: TRUE], (11): [.l: 111, .b: FALSE]]}
+ gdb_test_exact "print setarr" \
+ {= [(aa): [.l: 10, .b: TRUE], (bb): [.l: 111, .b: FALSE]]}
send "set print pretty\n" ; expect -re "$prompt $"
gdb_test_exact "print y" \
-{= [
- (`a`) [
- .l: 10,
- .b: TRUE
- ],
- ('b') [
- .l: 111,
- .b: FALSE
+{= [('a'): [\r
+ .l: 10, \r
+ .b: TRUE\r
+ ], ('b'): [\r
+ .l: 111, \r
+ .b: FALSE\r
]]} "print y pretty"
}
# haven't tried to compile one, or the compilation failed for some reason.
# In either case, just notify the user and skip the tests in this file.
-set binfile "chillvars"
+set binfile "pr-5020.exe"
set srcfile $binfile.ch
if ![file exists $objdir/$subdir/$binfile] then {
- if $all_flag then {
- warning "$binfile does not exist; tests suppressed."
- }
+ warning "$objdir/$subdir/$binfile does not exist; tests suppressed."
} else {
do_tests
}