[GiNaC-list] Re: ginac parsing from string issue (hopefully nailed!)

Francesco Biscani bluescarni at gmail.com
Wed Jul 12 14:51:29 CEST 2006


On Tuesday 11 July 2006 20:36, you wrote:
> Please have a look at the ginac-list mailing list archives: The problem
> has been traced to be in an interaction with the bison-generated file
> with gcc 4.1.x.

Hi Richy,

I've followed the list's suggestion but unfortunately upgrading from bison-2.2 
to bison-2.3 (and recompiling gcc+cln+ginac) did not solve the issue for me.

However, one post in the list mentioned that turning off optimizations made 
the issue disappear. So I made a bisect search for the faulty gcc 
optimization starting from -O1 (where the problem was not present) to -O2, 
recompiling ginac each time.

According to this, the optimization that causes the problem 
is "-fstrict-aliasing". Then I recompiled ginac with -O1 plus all the 
additional optimizations of -O2 (according to gcc man page) 
_excluding_ "-fstrict-aliasing". Now the test program runs properly :)

I hope this can somehow be useful. I don't think I should open a bug against 
gcc, since apparently in gcc-4.1.2pre the problem seems to be solved. 
Suggestions are welcome...

Thanks for all the help guys, now I can go back to coding :)

Regards,

  Francesco

-- 
Dr. Francesco Biscani
Dipartimento di Astronomia
Università di Padova
biscani at pd.astro.it


More information about the GiNaC-list mailing list