problem with pointer to function and _Complex type on Itanium

problem with pointer to function and _Complex type on Itanium

I have a problem with a pointer to function which accept as arguments a "long double _Complex" and an integer.
If the function is directly called, the integer value is correct.
But if the function is called by a pointer, the integer has wrong values.
If I replace the type of the first argument by "double _Complex", the integer value is correct.

I use the intel C++ "compiler Version 8.0 Build 20040416 Package ID: l_cc_pc_8.0.066" on Redhat Linux AS 2.1 on an Itanioum2.

I think that the compiler generates invalid codes with "long double _Complex" and pointer to function.

I compile with the following command :
icc bugia6420040625.c -o bugia64

Mickael,

#include "stdio.h"
#include "complex.h"

typedef long double _Complex t_zquad_stack;

void f1( t_zquad_stack c, int taille);

void f1( t_zquad_stack c, int taille)
{
printf("f1 : taille=%d
", taille);
}

int main()
{
t_zquad_stack zero=0.E0L+0.E0L*I;
void (*opfunc1)(t_zquad_stack, int) = f1;

(*opfunc1)( zero,10);
f1( zero,10);

return 0;
}

1 contenuto / 0 nuovi
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione