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

Sheplyakov Alexei varg at theor.jinr.ru
Wed Jul 12 18:54:08 CEST 2006


Hello,

On Wed, Jul 12, 2006 at 02:51:29PM +0200, Francesco Biscani wrote:
> 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've tried building *old* bison generated code with 
'-O2 -g -fno-strict-aliasing':

make CXXFLAGS="-O2 -g -Wall" && rm -f ginac/.libs/input_parser.o && \
rm -f ginac/input_parser.lo && \
make CXXFLAGS="-O2 -g -Wall -fno-strict-aliasing" && \
make check CXXFLAGS="-O2 -g -Wall" 

No test failed. So I suspect that code in question (files 
ginac/input_parser.cc ginac/input_parser.h) have not been re-generated
(since make does not know that code depends on version of bison). Could
you please check if this is the case? Try to remove these files (source
and header), and rebuild GiNaC with CXXFLAGS="-O2".

Best regards,
 Alexei.

-- 
All science is either physics or stamp collecting.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-list/attachments/20060712/78ad0089/attachment.pgp


More information about the GiNaC-list mailing list