Bug 171940

Summary: Compiler goes into infinite loop when compiling Boost::Spirit programs
Product: Red Hat Enterprise Linux 3 Reporter: Tony Kay <tony.kay>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 3.0CC: poelstra
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2006-0147 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-15 15:30:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 168424    
Attachments:
Description Flags
The pre-processed source
none
gcc32-pr18300.patch none

Description Tony Kay 2005-10-27 22:56:54 UTC
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/1.7.9.0a

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):

#include <boost/spirit.hpp>
#include <boost/bind.hpp>

using namespace boost::spirit;
using boost::bind;

void init_imap_append()
{
   rule<> imap_append, imap_mailbox, imap_flag_list, imap_date_time,
          imap_literal;

   imap_append
      =    as_lower_d["append"] 
        >> ' ' >> imap_mailbox 
        >> !(  ' ' >> imap_flag_list) 
        >> !(  ' ' >> imap_date_time) 
        >> ' ' >> imap_literal
      ;
}


Version-Release number of selected component (if applicable):
3.2.3

How reproducible:
Always

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

Additional info:

I have gentoo with gcc 3.3.6, and Fedora core 4 with gcc 4.0.1. They compile this code just fine.

Comment 1 Jakub Jelinek 2005-10-28 12:19:03 UTC
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
to verify.

Comment 2 Tony Kay 2005-10-28 16:59:49 UTC
Created attachment 120507 [details]
The pre-processed source

Comment 3 Jakub Jelinek 2005-11-11 11:00:14 UTC
Created attachment 120928 [details]
gcc32-pr18300.patch

I have verified this is a dup of #164421, pasting here the fix as well.

Comment 10 Red Hat Bugzilla 2006-03-15 15:30:10 UTC
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.

http://rhn.redhat.com/errata/RHBA-2006-0147.html