+2006-02-13 Borut Razem <borut.razem AT siol.net>
+
+ * src/regression/ptrarg.c: added, fails due to bug #1430967
+ * src/regression/Makefiel: ptrarg.c added, ...
+
2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
* src/z80/gen.c (genUnpackBits): fixed bug 1019480
CC = sdcc
LINKER = gplink
TARGETPIC = 16f877
-CFLAGS = -I ../../device/include/pic -mpic14 -c -pp$(TARGETPIC)
+CFLAGS = -Wl,--map -I ../../device/include/pic -mpic14 -pp$(TARGETPIC)
.SUFFIXES: .asm .c .cod .stc
add3.c \
and1.c \
and2.c \
+ b.c \
bool1.c \
bool2.c \
bool3.c \
compare5.c \
compare6.c \
for.c \
+ inline.c \
nestfor.c \
or1.c \
+ ptrarg.c \
+ ptrfunc.c \
rotate1.c \
rotate2.c \
rotate3.c \
sub2.c \
switch1.c \
while.c \
- xor.c \
- ptrfunc.c
-
+ xor.c
+# arrays.c \
+# add4.c \
+# bank1.c \
+# compare7.c \
+# compare8.c \
+# compare9.c \
+# compare10.c \
+# configword.c \
+# mult1.c \
+# pointer1.c \
+# rotate6.c \
+# rotate7.c \
+# string1.c \
# struct1.c \
-# mul1.c \
COD := $(patsubst %.c, %.cod, $(SRC))
ASM := $(patsubst %.c, %.asm, $(SRC))
all: test
-# The asm files are generated by sdcc
-.c.o:
- $(Q)$(CC) $(CFLAGS) $*.c
-
-# The .cod files are generated by gpasm
-# these get loaded by gpsim.
-.o.cod:
- $(Q)$(LINKER) --map -c -o $*.o $*.o
-
-# gpasm $*.asm
-
-# gpasm -c -I $(HEADER) $*.asm
-
+# The cod files are generated by sdcc
+.c.cod:
+ $(Q)$(CC) $(CFLAGS) $*.c
# The .stc files are script files for gpsim
.cod.stc:
--- /dev/null
+#include "gpsim_assert.h"
+
+// Pointer to argumet tests
+#define VALUE 0x1234
+
+unsigned char failures = 0;
+
+void
+done()
+{
+ ASSERT(MANGLE(failures) == 0);
+ PASSED();
+}
+
+void
+f2(int *p1)
+{
+ int t = *p1;
+
+ if (t != VALUE)
+ ++failures;
+
+ if (*p1 != VALUE)
+ ++failures;
+}
+
+void
+f1(int p1)
+{
+ f2(&p1);
+}
+
+void
+main (void)
+{
+ f1 (VALUE);
+
+ done ();
+}