Array vars clobbered in 4GL 730UC5
Posted in 2000
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Hi, I've found a serious problem with Informix 4gl 730UC5 for Intel Linux. The following code demonstrates this: DEFINE func ARRAY[1000] OF RECORD kn SMALLINT, descn CHAR(40) END RECORD LET func[1].kn=3 LET func[1].descn="" DISPLAY func[1].kn The value will appear as 8195. ( func[1].kn=1 gives 8193 ). It only happens if you assign descn="" not " " or NULL or another value. It appears that desc="" clobbers the smallint in the array. It also happens when other vars are declared in the record and for all array indexes. Can anyone else reproduce this with that tool version? Regards, Chris.
Christopher Moore <informix@nihc.demon.co.uk> writes: > The value will appear as 8195. ( func[1].kn=1 gives 8193 ). > It only happens if you assign descn="" not " " or NULL or another value. > It appears that desc="" clobbers the smallint in the array. > It also happens when other vars are declared in the record and for all > array indexes. > Can anyone else reproduce this with that tool version? RHL 7.0 with compat-{binutils,egcs,libs)-5.2 from my RHL 6.2 disc set. IDS 7.30UC7 4GL 7.20UD1 I get 3 as the result compiling with c4gl -g, -O, and -O2. I did have problems compiling any fgiusr.c with -O2 for customized 4GL runners and debuggers, though, with this release. -- Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412 Ronald Cole <ronald@forte-intl.com> Phone: (760) 499-9142 President, CEO Fax: (760) 499-9152 My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B