I added #if 0 around blocks of code to find which piece of code triggers
the bug.
By trial an error, I found out that 'gcc -O2' compile successfully if I
comment the following lines:
96297 #if 0
96298 parse_info<iterator_type> info = parse(first, last, l);
96299
96300 if (info.hit || ignore_docinfo)
96301 {
96302 pre(actor.out, actor, ignore_docinfo);
96303
96304 block_grammar<actions> g(actor);
96305 info = parse(info.hit ? info.stop : first, last, g);
96306 if (info.full)
96307 {
96308 post(actor.out, actor, ignore_docinfo);
96309 }
96310 }
96311
96312 if (!info.full)
96313 {
96314 file_position const pos = info.stop.get_position();
96315 detail::outerr(pos.file,pos.line)
96316 << "Syntax Error near column " << pos.column << ".\n";
96317 return 1;
96318 }
96319 #endif
[EMAIL PROTECTED]:/tmp$ time g++ -O2 -c -o quickbook.o quickbook.cpp
real 0m5.072s
user 0m4.880s
sys 0m0.192s
But if I move the '#if 0' only one line below (as follows) then 'gcc -O2' loops
forever:
96297 parse_info<iterator_type> info = parse(first, last, l);
96298 #if 0
96299
96300 if (info.hit || ignore_docinfo)
96301 {
96302 pre(actor.out, actor, ignore_docinfo);
96303
96304 block_grammar<actions> g(actor);
96305 info = parse(info.hit ? info.stop : first, last, g);
96306 if (info.full)
96307 {
96308 post(actor.out, actor, ignore_docinfo);
96309 }
96310 }
96311
96312 if (!info.full)
96313 {
96314 file_position const pos = info.stop.get_position();
96315 detail::outerr(pos.file,pos.line)
96316 << "Syntax Error near column " << pos.column << ".\n";
96317 return 1;
96318 }
96319 #endif
So it seems to be the template...
96297 parse_info<iterator_type> info = parse(first, last, l);
... which is triggering the bug.
--
g++: infinite loop with -O3 while compiling Boost.Quickbook from Boost CVS
https://bugs.launchpad.net/bugs/82404
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs