Re: should_duplicate_loop_header_p and volatile asm statements

2005-11-14 Thread Mike Stump
On Nov 14, 2005, at 1:31 AM, Florian Weimer wrote: The documentation of the asm keyword does not explicitly say that a volatile asm statement may be duplicated by the compiler, but of course it is to be expected in some cases (inlining, for example). However, for consistency, it might be better t

Re: should_duplicate_loop_header_p and volatile asm statements

2005-11-14 Thread Florian Weimer
* Steven Bosscher: > On Nov 14, 2005 10:31 AM, Florian Weimer <[EMAIL PROTECTED]> wrote: >> >> What do you think? > > I thought labels can't appear in an asm statement...? Of course, you can put pretty much what you want into asm statements, the compiler does not look at them. Jumping from one a

Re: should_duplicate_loop_header_p and volatile asm statements

2005-11-14 Thread Steven Bosscher
On Nov 14, 2005 10:31 AM, Florian Weimer <[EMAIL PROTECTED]> wrote: > > What do you think? I thought labels can't appear in an asm statement...?   Gr. Steven    

should_duplicate_loop_header_p and volatile asm statements

2005-11-14 Thread Florian Weimer
In the following test case (based on gcc.dg/tree-ssa/copy-headers.c), the volatile asm statement is duplicated: extern int foo (int); void bla (void) { int i, n = foo (0); for (i = 0; (({{ __asm__ volatile ("foo_label:"); }}), i < n); i++) foo (i); } In this case, this is problematic b