diff --git a/gcc/cobol/ccc/p.py b/gcc/cobol/ccc/p.py new file mode 100644 index 0000000000000000000000000000000000000000..cc446b38456217044ed75091ceae8c1cd852c4cc --- /dev/null +++ b/gcc/cobol/ccc/p.py @@ -0,0 +1,11 @@ +def main(): + print("Hello") + f = open("xxx.c", 'w') + for i in range(10): + f.write(" LEFT\n") + f.write(" STATIC int a{} = {};\n".format(i, i)) + f.write(" a{} = a{} + n;\n".format(i, i)) + f.write(" foo(a{});\n".format(i)) + f.write(" RIGHT\n") + f.close() +main() diff --git a/gcc/cobol/failures/twocall/Makefile b/gcc/cobol/failures/twocall/Makefile deleted file mode 100644 index f77e46b3451abf45cb70ed9dc161be56b3b063c7..0000000000000000000000000000000000000000 --- a/gcc/cobol/failures/twocall/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../Makefile.inc diff --git a/gcc/cobol/failures/twocall/caller.c b/gcc/cobol/failures/twocall/caller.c deleted file mode 100644 index 4d7eae01473dc82334977b8d79bb4c576b8a0862..0000000000000000000000000000000000000000 --- a/gcc/cobol/failures/twocall/caller.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stddef.h> -#include <stdio.h> -void called_cobol(size_t *, size_t *); - -void called_c (size_t) - { - size_t a = 1234; - size_t b = 5678; - printf("calling called_cobol from C\n"); - called_cobol(&a, &b); - } - diff --git a/gcc/cobol/failures/twocall/input.txt b/gcc/cobol/failures/twocall/input.txt deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/gcc/cobol/failures/twocall/twocall b/gcc/cobol/failures/twocall/twocall deleted file mode 100644 index 995f41ec30f79087038b98ce37f329c26d9e8831..0000000000000000000000000000000000000000 Binary files a/gcc/cobol/failures/twocall/twocall and /dev/null differ diff --git a/gcc/cobol/failures/twocall/twocall.cbl b/gcc/cobol/failures/twocall/twocall.cbl deleted file mode 100644 index 822c91fa81f1b42c626a5fb2e1a28700f44f15fd..0000000000000000000000000000000000000000 --- a/gcc/cobol/failures/twocall/twocall.cbl +++ /dev/null @@ -1,33 +0,0 @@ - identification division. - program-id. caller. - data division. - working-storage section. - 01 aa pic 9(16) comp-5 value 4321. - 01 bb pic 9(16) comp-5 value 8765. - procedure division. - display "I am program caller" - call "called_c" using by value aa - goback. - end program caller. - - identification division. - program-id. called_cobol. - data division. - working-storage section. - 01 p pointer. - linkage section. - 01 a pic 9(16) comp-5. - 01 b pic 9(16) comp-5. - procedure division using by reference a by reference b. - set p to address of a - display p - set p to address of b - display p - display "address of a " address of b - display "address of b " address of b - display "called in cobol by reference " a space b - goback. - end program called_cobol. - - - diff --git a/gcc/cobol/parse.y b/gcc/cobol/parse.y index 8636695f80bf4f410f4ca5dafc839c5fbc7e2856..d06b167d3651ce81a5854fc18d83578f9d16b906 100644 --- a/gcc/cobol/parse.y +++ b/gcc/cobol/parse.y @@ -12,7 +12,6 @@ * in the documentation and/or other materials provided with the * distribution. * * Neither the name of the Symas Corporation nor the names of its - * * Neither the name of the Symas Corporation nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * diff --git a/gcc/cobol/tests/.gitignore b/gcc/cobol/tests/.gitignore index 7782b432bb527357e2fab83edeb518eb0a2148f0..c29f5923e7c3411eb146029a6382867414524536 100644 --- a/gcc/cobol/tests/.gitignore +++ b/gcc/cobol/tests/.gitignore @@ -6,3 +6,4 @@ under-test.txt *.o *.nodes *.nodes.html +*.json