From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralf Gütlein To: "gcc" , "gnuh8" , "Kazu Hirata" Subject: h8300: less optimal (buggy?) compiler output with last build Date: Wed, 16 Aug 2000 07:20:00 -0000 Message-id: <004901c0078d$3e8bb3e0$650b0d0a@Alzenau> X-SW-Source: 2000-08/msg00334.html After installing the latest build of the h8 toolchain, I realized that the compiler output (assembler source) is worse than before (I used to use a snapshot from December 99). One concrete example (cc the use of inline functions): extern unsigned char volatile TCW; inline Watchdog() { TCW = 0; } void testcase_1(void) { TCW = 0; } void testcase_2(void) { Watchdog(); } The h8 assembler source (compiled with -Os -fomit-frame-pointer): testcase_1: sub r2l, r2l mov.b r2l, TCW rts testcase_2: sub r2l, r2l mov.b r2l, TCW mov.b TCW, r2l ; <-- ???? rts As you can see, in the "inline" test case there is an erroneous read of the previously written address. This could be fatal (in case of an embedded system), when the hardware doesn't "like" read access to a write-only position. So there is good reason to treat this as a BUG. As I mentioned before, this problem didn't occure in earlier versions (e.g. Dec-99). Is this issue present in other ports? Will this be investigated by somebody? Or, could anybody give hints where to look for this issue in the sources? Regards, Ralf ..... ô ô ) -----oOOo--(_)---oOOo------ Ralf Guetlein Biotest Medizintechnik GmbH Industriestrasse 19 D-63755 Alzenau Germany --------------------------- Tel. +49 6023 9487-42 Fax. +49 6023 9487-33 ralf.guetlein@biotest-mt.de ---------------------------