Bug 54432

Summary: Compiling the boost++ library crashes the g++ compiler in except.c:2809
Product: [Retired] Red Hat Linux Reporter: Nick Wells <nick.wells>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED WORKSFORME QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-12-15 17:53:53 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:

Description Nick Wells 2001-10-08 09:46:25 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010808

Description of problem:
The default jam (build) script for the boost++ libraries specifies -O4
optimisation. This makes g++ crash when it is compiling the cregex.cpp
module, the error is in except.c, line 2809.
Turning off optimisation fixes it. (I tried with -O3 and -O2 with the same
result)

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


How reproducible:
Always

Steps to Reproduce:
1.download boost++ 1.25.0 from www.boost.org
2.follow the build instructions ...
3.jam -ftools/build/allyourbase.jam -sTOOLS="gcc"
	

Actual Results:  gcc-C++-action
libs/regex/build/bin/libboost_regex.so/gcc/release/runtime-link-dynamic/shared-linkable-true/cregex.o

boost/regex.hpp: In function `iterator 
boost::re_detail::re_is_set_member (iterator, iterator, 
boost::re_detail::re_set_long *, const boost::reg_expression<charT, 
traits_type, Allocator> &) [with iterator = 
boost::re_detail::mapfile_iterator, charT = char, traits_type = 
boost::regex_traits<char>, Allocator = allocator<char>]':
boost/regex/detail/regex_match.hpp:545:   instantiated from
`boost::re_detail::query_match_aux (iterator, iterator,
boost::match_results<iterator, Allocator> &, const
boost::reg_expression<charT, traits, Allocator2> &, unsigned int,
boost::re_detail::_priv_match_data<iterator, Allocator> &, iterator *)
[with iterator = boost::re_detail::mapfile_iterator, Allocator =
allocator<char>, charT = char, traits = boost::regex_traits<char>,
Allocator2 = allocator<char>]'
boost/regex/detail/regex_match.hpp:1097:   instantiated from
`boost::re_detail::reg_grep2 (Predicate, I, I, const
boost::reg_expression<charT, traits, Allocator2> &, unsigned int, A2) [with
Predicate = boost::re_detail::pred4, I =
boost::re_detail::mapfile_iterator, charT = char, traits =
boost::regex_traits<char>, A = allocator<char>, A2 = allocator<char>]'
boost/regex/detail/regex_match.hpp:1756:   instantiated from
`boost::regex_grep (Predicate, iterator, iterator, const
boost::reg_expression<charT, traits, Allocator2> &, unsigned int) [with
Predicate = boost::re_detail::pred4, iterator =
boost::re_detail::mapfile_iterator, charT = char, traits =
boost::regex_traits<char>, Allocator = allocator<char>]'
libs/regex/build/../src/cregex.cpp:387:   instantiated from here
boost/regex.hpp:244: Internal compiler error in scan_region, at 
except.c:2809
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

    g++  -c -Wall -ftemplate-depth-100  -DNDEBUG -DBOOST_RE_BUILD_DLL=1 
-O4 -finline-functions -Wno-inline -fPIC   -I"libs/regex/build"
-I"libs/regex/build/../../.."   -o
"libs/regex/build/bin/libboost_regex.so/gcc/release/runtime-link-dynamic/shared-linkable-true/cregex.o"
 "libs/regex/build/../src/cregex.cpp" 

...failed gcc-C++-action
libs/regex/build/bin/libboost_regex.so/gcc/release/runtime-link-dynamic/shared-linkable-true/cregex.o
...
...skipped
<libs!regex!build/libboost_regex.so/gcc/release/runtime-link-dynamic/shared-linkable-true>libboost_regex.so
for lack of
<libs!regex!build/libboost_regex.so/gcc/release/runtime-link-dynamic/shared-linkable-true>cregex.o...
...failed updating 2 targets...
...skipped 2 targets...


Additional info:

Comment 1 Jakub Jelinek 2001-10-10 19:41:32 UTC
Please supply preprocessed testcase (cregex.ii) which you get if you add
-save-temps to the g++ command line used to compile cregex.cpp.

Comment 2 Jakub Jelinek 2001-10-10 23:15:37 UTC
What exact gcc do you use?
I could reproduce it with e.g. gcc-2.96-79, but cannot reproduce it with
gcc-2.96-85 (which is the 7.1 errata rpm) or gcc-2.96-99.