Possilbe CINT bug Using cout

The following macro:
Double_t myfunction(Double_t e)
{
Double_t value = e;
Double_t a;
Double_t b;
Double_t c;
return value;
}

void bug()
{
Double_t e[2]={1,2};
cout<<e[0]<<" “<<myfunction(e[0])<<endl;
for(Int_t i=0;i<2;i++) cout<<e[i]<<” "<<myfunction(e[i])<<endl;
}

generates the following:

root [0] .L bug.C
root [1] bug();
1 1
1 7.02106e+194
2 2
root [2]

In root version 20.0 on Windows XP
I also see a failure in root version 18.0 on Scientific Linux 5.1.
(It gives a Nan result.)

Under investigation. A workaround is to select CINT optimisation level 0, ie

root > .O 0 root > .x bug.C

Rene