[Bug c/39403] Excessive optimization issue

2009-03-09 Thread casmyu at gmail dot com
--- Comment #3 from casmyu at gmail dot com 2009-03-10 01:23 --- Hi: I have changed the code as you said, but it is more error now. 1 #include 2 3 int main() 4 { 5 char src[30] = {"This is a test message.\n"}; 6 char dst[30]; 7 int len = 25; 8 9 __asm_

[Bug c/39403] Excessive optimization issue

2009-03-09 Thread pinskia at gmail dot com
--- Comment #2 from pinskia at gmail dot com 2009-03-09 15:57 --- Subject: Re: Excessive optimization issue Sent from my iPhone On Mar 9, 2009, at 8:36 AM, "rguenth at gcc dot gnu dot org" wrote: > > > --- Comment #1 from rguenth at gcc dot gnu dot org 2009-03-09 > 15:36 --

Re: [Bug c/39403] Excessive optimization issue

2009-03-09 Thread Andrew Thomas Pinski
Sent from my iPhone On Mar 9, 2009, at 8:36 AM, "rguenth at gcc dot gnu dot org" > wrote: --- Comment #1 from rguenth at gcc dot gnu dot org 2009-03-09 15:36 --- You need to specify that the registers are clobbered by the asm. The only way to do that is to use output constrai

[Bug c/39403] Excessive optimization issue

2009-03-09 Thread rguenth at gcc dot gnu dot org
--- Comment #1 from rguenth at gcc dot gnu dot org 2009-03-09 15:36 --- You need to specify that the registers are clobbered by the asm. The only way to do that is to use output constraints ("+D", "+c", etc.) on proper temporaries. int lent = len; char *dstt = dst; char *srct = s