gcc/testsuite/gm2/extensions/run/pass/callingc.mod
raw| 1 | MODULE callingc ; |
| 2 | |
| 3 | FROM libc IMPORT printf, exit ; |
| 4 | FROM StrLib IMPORT StrLen ; |
| 5 | |
| 6 | VAR |
| 7 | a: ARRAY [0..1] OF CHAR ; |
| 8 | BEGIN |
| 9 | printf ("\n") ; |
| 10 | IF StrLen ("\n") # 2 |
| 11 | THEN |
| 12 | printf ("yes the conversion of the string into printf has corrupted the literal version as well!\n") ; |
| 13 | exit (1) |
| 14 | END ; |
| 15 | a := "\n" ; |
| 16 | IF StrLen (a) # 2 |
| 17 | THEN |
| 18 | printf ("yes the conversion of the string into printf has corrupted the array version as well!\n") ; |
| 19 | exit (2) |
| 20 | END |
| 21 | END callingc. |