[Bug c++/52510] New: [4.8 regression] libitm/config/posix/rwlock.cc doesn't compile
ro at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 6 13:59:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52510
Bug #: 52510
Summary: [4.8 regression] libitm/config/posix/rwlock.cc doesn't
compile
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ro@gcc.gnu.org
CC: jason@gcc.gnu.org
Host: *-*-solaris2*
Target: *-*-solaris2*
Build: *-*-solaris2*
Between 20120302 and 20120306, mainline doesn't bootstrap on Solaris any
longer:
compiling libitm/config/posix/rwlock.cc fails like this:
/vol/gcc/src/hg/trunk/local/libitm/config/posix/rwlock.cc: In constructor
'GTM::gtm_rwlock::gtm_rwlock()':
/vol/gcc/src/hg/trunk/local/libitm/config/posix/rwlock.cc:40:17: error: no
matching function for call to '_pthread_mutex::_pthread_mutex(<brace-enclosed
initializer list>)'
/vol/gcc/src/hg/trunk/local/libitm/config/posix/rwlock.cc:40:17: note:
candidates are:
In file included from /usr/include/sys/wait.h:20:0,
from /usr/include/stdlib.h:22,
from /vol/gcc/src/hg/trunk/local/libitm/libitm_i.h:36,
from
/vol/gcc/src/hg/trunk/local/libitm/config/posix/rwlock.cc:25:
/usr/include/sys/types.h:381:16: note: _pthread_mutex::_pthread_mutex()
/usr/include/sys/types.h:381:16: note: candidate expects 0 arguments, 1
provided
/usr/include/sys/types.h:381:16: note: constexpr
_pthread_mutex::_pthread_mutex(const _pthread_mutex&)
/usr/include/sys/types.h:381:16: note: no known conversion for argument 1
from '<brace-enclosed initializer list>' to 'const _pthread_mutex&'
/usr/include/sys/types.h:381:16: note: constexpr
_pthread_mutex::_pthread_mutex(_pthread_mutex&&)
/usr/include/sys/types.h:381:16: note: no known conversion for argument 1
from '<brace-enclosed initializer list>' to '_pthread_mutex&&'
and several more. Compiling the preprocessed with with g++ 4.7 works just
fine.
The issue can be reproduced with the attached testcase:
$ cc1plus -fpreprocessed init.ii -quiet -g -O2 -std=gnu++11 -o init.s
init.ii: In constructor 'gtm_rwlock::gtm_rwlock()':
init.ii:24:46: error: no matching function for call to
'_pthread_cond::_pthread_cond(<brace-enclosed initializer list>)'
init.ii:24:46: note: candidates are:
init.ii:7:16: note: _pthread_cond::_pthread_cond()
init.ii:7:16: note: candidate expects 0 arguments, 1 provided
init.ii:7:16: note: constexpr _pthread_cond::_pthread_cond(const
_pthread_cond&)
init.ii:7:16: note: no known conversion for argument 1 from '<brace-enclosed
initializer list>' to 'const _pthread_cond&'
init.ii:7:16: note: constexpr _pthread_cond::_pthread_cond(_pthread_cond&&)
init.ii:7:16: note: no known conversion for argument 1 from '<brace-enclosed
initializer list>' to '_pthread_cond&&'
I suspect that this patch
2012-03-03 Jason Merrill <jason@redhat.com>
* init.c (perform_member_init): Cope with uninstantiated NSDMI.
Core 1270
* call.c (build_aggr_conv): Call reshape_init.
(convert_like_real): Likewise.
* typeck2.c (process_init_constructor): Clear TREE_CONSTANT if
not all constant.
is the culprit.
Rainer
More information about the Gcc-bugs
mailing list