https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109497
Bug ID: 109497
Summary: Adding two constant chars should result in a string of
two chars
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: modula2
Assignee: gaius at gcc dot gnu.org
Reporter: gaius at gcc dot gnu.org
Target Milestone: ---
Adding two constant chars should result in a string of two chars and not a
single char of the sum of the two constants.
MODULE addcharconst ;
FROM libc IMPORT printf, exit ;
FROM StrLib IMPORT StrLen ;
PROCEDURE input (a: ARRAY OF CHAR) ;
BEGIN
IF StrLen (a) # 2
THEN
printf ("string length is not 2, but %d\n", StrLen (a)) ;
exit (1)
END
END input ;
BEGIN
input (015C + 012C) ;
printf ("successful test, finishing\n")
END addcharconst.