This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/42346] darwin instantiation vs. optimization oddity



------- Comment #5 from bkoz at gcc dot gnu dot org  2010-01-04 20:35 -------
Created an attachment (id=19468)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19468&action=view)
remove -O1 to cause fail


With this patch, the following gcc:

ames:gcc benjamin$ ./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=./gcc/xgcc
Target: x86_64-apple-darwin10.2.0
Configured with: /Users/benjamin/src/gcc/configure
--prefix=/Users/benjamin/bld/H-ames-gcc --enable-languages=c,c++
--enable-__cxa_atexit --enable-checking=release --with-cpu=generic
--disable-multilib --with-mpfr=/Users/benjamin/bld/H-ames-mpfr-2.4.1
--with-gmp=/Users/benjamin/bld/H-ames-gmp-4.3.1
--with-mpc=/Users/benjamin/bld/H-ames-mpc-0.8
Thread model: posix
gcc version 4.5.0 20100101 (experimental) (GCC) 

gives this:
/Users/benjamin/bld/gcc/./gcc/g++ -shared-libgcc -B/Users/benjamin/bld/gc\
c/./gcc -nostdinc++
-L/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc\
++-v3/src
-L/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/src/\
.libs -B/Users/benjamin/bld/H-ames-gcc/x86_64-apple-darwin10.2.0/bin/
-B/Users/\
benjamin/bld/H-ames-gcc/x86_64-apple-darwin10.2.0/lib/ -isystem
/Users/benjamin\
/bld/H-ames-gcc/x86_64-apple-darwin10.2.0/include -isystem
/Users/benjamin/bld/\
H-ames-gcc/x86_64-apple-darwin10.2.0/sys-include
-B/Users/benjamin/bld/gcc/x86_\
64-apple-darwin10.2.0/./libstdc++-v3/src/.libs -g -O2 -D_GLIBCXX_ASSERT
-fmessa\
ge-length=0 -ffunction-sections -fdata-sections -g -O2 -g -O2 -DLOCALEDIR="."
-\
nostdinc++
-I/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/inc\
lude/x86_64-apple-darwin10.2.0
-I/Users/benjamin/bld/gcc/x86_64-apple-darwin10.\
2.0/libstdc++-v3/include -I/Users/benjamin/src/gcc/libstdc++-v3/libsupc++
-I/Us\
ers/benjamin/src/gcc/libstdc++-v3/include/backward
-I/Users/benjamin/src/gcc/li\
bstdc++-v3/testsuite/util
/Users/benjamin/src/gcc/libstdc++-v3/testsuite/23_con\
tainers/map/requirements/exception/basic.cc -std=gnu++0x ./libtestc++.a
-liconv\
 -lm -o ./basic.exe^M
In file included from
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc\
++-v3/include/bits/move.h:38:0,^M
                 from
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc\
++-v3/include/bits/stl_pair.h:60,^M
                 from
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc\
++-v3/include/bits/stl_algobase.h:66,^M
                 from
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc\
++-v3/include/bits/stl_tree.h:62,^M
                 from
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc\
++-v3/include/map:60,^M
                 from
/Users/benjamin/src/gcc/libstdc++-v3/testsuite/23_contain\
ers/map/requirements/exception/basic.cc:23:^M
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/include/type_tra\
its: In instantiation of 'const bool
std::__is_convertible_helper<__gnu_cxx::th\
row_value_limit, __gnu_cxx::throw_value_limit, false>::__value':^M
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/include/type_tra\
its:312:5:   instantiated from
'std::is_convertible<__gnu_cxx::throw_value_limi\
t, __gnu_cxx::throw_value_limit>'^M
/Users/benjamin/src/gcc/libstdc++-v3/testsuite/util/exception/safety.h:97:31: 
\
 instantiated from here^M
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/include/type_tra\
its:302:71: error: no matching function for call to
'__gnu_cxx::throw_value_lim\
it::throw_value_limit(__gnu_cxx::throw_value_limit)'^M
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/include/ext/thro\
w_allocator.h:565:5: note: candidates are:
__gnu_cxx::throw_value_limit::throw_\
value_limit(const size_t)^M
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/include/ext/thro\
w_allocator.h:563:5: note:                
__gnu_cxx::throw_value_limit::throw_\
value_limit()^M
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/include/type_tra\
its:302:71: error:   initializing argument 1 of 'static
std::__sfinae_types::__\
one std::__is_convertible_helper<_From, _To, false>::__test(_To) [with _From =
\
__gnu_cxx::throw_value_limit, _To = __gnu_cxx::throw_value_limit,
std::__sfinae\
_types::__one = char]'^M
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/include/type_tra\
its: In instantiation of 'std::is_convertible<__gnu_cxx::throw_value_limit,
__g\
nu_cxx::throw_value_limit>':^M
/Users/benjamin/src/gcc/libstdc++-v3/testsuite/util/exception/safety.h:97:31: 
\
 instantiated from here^M
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/include/type_tra\
its:312:5: error: 'std::__is_convertible_helper<__gnu_cxx::throw_value_limit,
_\
_gnu_cxx::throw_value_limit, false>::__value' is not a valid template argument
\
for type 'bool' because it is a non-constant expression^M
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/include/type_tra\
its: In instantiation of 'const bool std::__is_convertible_helper<const
__gnu_c\
xx::throw_value_limit, const __gnu_cxx::throw_value_limit, false>::__value':^M
/Users/benjamin/bld/gcc/x86_64-apple-darwin10.2.0/libstdc++-v3/include/type_tra\
its:312:5:   instantiated from 'std::is_convertible<const
__gnu_cxx::throw_valu\
e_limit, const __gnu_cxx::throw_value_limit>'^M
/Users/benjamin/src/gcc/libstdc++-v3/testsuite/util/exception/safety.h:97:31: 
\
 instantiated from here

ie, same error. There's nothing funny or weird about the compile line folks.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42346


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]