On Tue, May 09, 2006 at 10:57:22PM +0200, Richard B. Kreckel wrote:
Note that `make check' still fails with G++ 4.2. Basically,
ex e("-1 + 2*I", symbol());
triggers an exception. My patch *does not* fix this error.
This happens in check/exam_numeric.cpp (exam_numeric6), right?
Yes. There also the same error in check/exam_inifcns_nstdsums.cpp:inifcns_test_S(). Here is the simplest code which fails in the similar way (exception due to the parser error): #include <iostream> #include <ginac/ginac.h> using namespace std; using namespace GiNaC; int main(int argc, char** argv) { ex e = ex("-1 + 2*I", symbol()); cout << e << endl; return 0; } The error message is: Terminate called after throwing an instance of 'std::runtime_error' what(): syntax error, unexpected T_EOF, expecting ']' or ',' at
It appears like it goes away by hard-coding some similar computation right before the construction of base and exponent in the inner loop. Heisenbugs of this sort hint at a compiler problems, in my opinion.
I'm not sure if we are talking about the same bug...
For the record, I'm using GCC 4.2.0 20060506 (experimental).
$ dpkg -l gcc-snapshot | tail -n 1 ii gcc-snapshot 20060508-1 A SNAPSHOT of the GNU Compiler Collection Best regards, Alexei. -- All science is either physics or stamp collecting.