[Bug c/40967] Bad Intel64 codegen for modified 39495 testcase

brian dot e dot bliss at intel dot com gcc-bugzilla@gcc.gnu.org
Wed Aug 5 18:47:00 GMT 2009



------- Comment #2 from brian dot e dot bliss at intel dot com  2009-08-05 18:46 -------
My interpretation of that rule is that this is a legal testcase as long as ub
is even at runtime.  If ub is odd, then the behavior is undefined.

Anyway - that is a subject for bug 39495.  What I'm trying to address here is
the codegen problem, which doesn't seem to depend on the termination condition.
 Try

#include <stdlib.h>
#include <omp.h>

void foo(unsigned ub, unsigned N, unsigned *array)
{
    unsigned i;

#pragma omp for schedule(dynamic)
    for (i = ub; i > N; i -=2) {
        array[i] = i;
    }
}

and you still see ia32 code in setting up the parameters for the call to
GOMP_loop_dynamic_start:

movl    $1, %ecx
movl    $4294967294, %edx
movq    %rbx, %rsi
movq    %rax, %rdi
call    GOMP_loop_dynamic_start


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40967



More information about the Gcc-bugs mailing list