Bug 171940 - Compiler goes into infinite loop when compiling Boost::Spirit programs
Summary: Compiler goes into infinite loop when compiling Boost::Spirit programs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc
Version: 3.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 168424
TreeView+ depends on / blocked
 
Reported: 2005-10-27 22:56 UTC by Tony Kay
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHBA-2006-0147
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-03-15 15:30:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The pre-processed source (1.79 MB, text/plain)
2005-10-28 16:59 UTC, Tony Kay
no flags Details
gcc32-pr18300.patch (5.38 KB, patch)
2005-11-11 11:00 UTC, Jakub Jelinek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 18300 0 None None None Never
Red Hat Product Errata RHBA-2006:0147 0 qe-ready SHIPPED_LIVE gcc bug fix update 2006-03-14 05:00:00 UTC

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



Note You need to log in before you can comment on or make changes to this bug.