Red Hat Bugzilla – Bug 171940
Compiler goes into infinite loop when compiling Boost::Spirit programs
Last modified: 2007-11-30 17:07:08 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.12) Gecko/20050915 MultiZilla/18.104.22.168a
Description of problem:
Certain rule constructions done with Boost::spirit (www.boost.org) cause g++ 3.2.3 to go into an infinite loop.
Simple example (requires nothing more than boost libraries):
using namespace boost::spirit;
rule<> imap_append, imap_mailbox, imap_flag_list, imap_date_time,
>> ' ' >> imap_mailbox
>> !( ' ' >> imap_flag_list)
>> !( ' ' >> imap_date_time)
>> ' ' >> imap_literal
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Enter the program shown in description
2. Compile with "g++ sample.cc"
Actual Results: Compiler goes into infinite loop
Expected Results: compile
I have gentoo with gcc 3.3.6, and Fedora core 4 with gcc 4.0.1. They compile this code just fine.
Please preprocess that (g++ -E sample.cc -o sample.ii) and attach it here.
As boost is not included in RHEL3, that's the only way to make sure we are
looking at exactly the same source.
Anyway, I guess this is a dup of #164421, though need the preprocessed source
Created attachment 120507 [details]
The pre-processed source
Created attachment 120928 [details]
I have verified this is a dup of #164421, pasting here the fix as well.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.