[Bug rtl-optimization/23444] Volatile register access incorrectly optimized

2005-08-17 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 16:49 --- (In reply to comment #6) > Thanks, I will check it tomorrow. However, this behavior is different from > the > gcc 3, documented nowhere and broke (in a very bad way) a large program with > good reliabilit

[Bug rtl-optimization/23444] Volatile register access incorrectly optimized

2005-08-17 Thread oakad at yahoo dot com
--- Additional Comments From oakad at yahoo dot com 2005-08-17 16:47 --- Thanks, I will check it tomorrow. However, this behavior is different from the gcc 3, documented nowhere and broke (in a very bad way) a large program with good reliability record (so far). Can this be mentioned s

[Bug rtl-optimization/23444] Volatile register access incorrectly optimized

2005-08-17 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 16:38 --- No, the type of the local register variable is a pointer to a volatile "char" (or struct) and not a volative register. You want: register char*volatile cptr asm ("r29"); With that it works correctly. --

[Bug rtl-optimization/23444] Volatile register access incorrectly optimized

2005-08-17 Thread oakad at yahoo dot com
--- Additional Comments From oakad at yahoo dot com 2005-08-17 16:31 --- Sorry, I misunderstood you. The function is a part of a large project (namely, u-boot-1.1.3). What about this: //-- char str1[]="123456789"; char str2[10]; int main() {

[Bug rtl-optimization/23444] Volatile register access incorrectly optimized

2005-08-17 Thread pinskia at gcc dot gnu dot org
-- What|Removed |Added CC||pinskia at gcc dot gnu dot ||org Status|UNCONFIRMED

[Bug rtl-optimization/23444] Volatile register access incorrectly optimized

2005-08-17 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 15:59 --- (In reply to comment #2) > Preprocessed source: Of course that does not compile: t.c:1: error: parse error before "bootflag" t.c: In function `board_init_f': t.c:3: error: syntax error before '*' token t.c:5

[Bug rtl-optimization/23444] Volatile register access incorrectly optimized

2005-08-17 Thread oakad at yahoo dot com
--- Additional Comments From oakad at yahoo dot com 2005-08-17 15:50 --- Preprocessed source: //-- void board_init_f (ulong bootflag) { register volatile gd_t *gd asm ("r29"); bd_t *bd; ulong len, addr, addr_sp; gd_t *id; init_fnc_

[Bug rtl-optimization/23444] Volatile register access incorrectly optimized

2005-08-17 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 15:47 --- Of course we need the preprocessed source for this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23444

[Bug rtl-optimization/23444] Volatile register access incorrectly optimized

2005-08-17 Thread pinskia at gcc dot gnu dot org
-- What|Removed |Added Component|c |rtl-optimization Keywords||wrong-code http://gcc.gnu.org/bugzilla/show_