Compiling with the attached testcase:

$ g++ -frepo -c test.cc
/usr/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of
‘mpl_::integral_c<unsigned int, 0u>’:
/usr/include/boost/type_traits/integral_constant.hpp:21:   instantiated from
‘boost::integral_constant<unsigned int, 0u>’
/usr/include/boost/type_traits/alignment_of.hpp:81:   instantiated from here
/usr/include/boost/mpl/aux_/integral_wrapper.hpp:72: error: ‘(((unsigned
int)mpl_::integral_c<unsigned int, 0u>::value) + 1u)’ is not a valid template
argument for type ‘unsigned int’ because it is a non-constant expression
/usr/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of
‘mpl_::integral_c<unsigned int, 0u>’:
/usr/include/boost/type_traits/integral_constant.hpp:21:   instantiated from
‘boost::integral_constant<unsigned int, 0u>’
/usr/include/boost/type_traits/alignment_of.hpp:81:   instantiated from here
/usr/include/boost/mpl/aux_/integral_wrapper.hpp:73: error: ‘(((unsigned
int)mpl_::integral_c<unsigned int, 0u>::value) - 1u)’ is not a valid template
argument for type ‘unsigned int’ because it is a non-constant expression
/usr/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of
‘mpl_::int_<3>’:
/usr/include/boost/mpl/if.hpp:131:   instantiated from here
/usr/include/boost/mpl/aux_/integral_wrapper.hpp:72: error:
‘(((int)mpl_::int_<3>::value) + 1)’ is not a valid template argument for
type ‘int’ because it is a non-constant expression
/usr/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of
‘mpl_::int_<3>’:
/usr/include/boost/mpl/if.hpp:131:   instantiated from here
/usr/include/boost/mpl/aux_/integral_wrapper.hpp:73: error:
‘(((int)mpl_::int_<3>::value) - 1)’ is not a valid template argument for
type ‘int’ because it is a non-constant expression
/usr/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of
‘mpl_::int_<-0x00000000000000001>’:
/usr/include/boost/mpl/if.hpp:131:   instantiated from here
/usr/include/boost/mpl/aux_/integral_wrapper.hpp:72: error:
‘(((int)mpl_::int_<-0x00000000000000001>::value) + 1)’ is not a valid
template argument for type ‘int’ because it is a non-constant expression
/usr/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of
‘mpl_::int_<-0x00000000000000001>’:
/usr/include/boost/mpl/if.hpp:131:   instantiated from here
/usr/include/boost/mpl/aux_/integral_wrapper.hpp:73: error:
‘(((int)mpl_::int_<-0x00000000000000001>::value) - 1)’ is not a valid
template argument for type ‘int’ because it is a non-constant expression
/usr/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of
‘mpl_::int_<1>’:
/usr/include/boost/mpl/not.hpp:47:   instantiated from here
/usr/include/boost/mpl/aux_/integral_wrapper.hpp:72: error:
‘(((int)mpl_::int_<1>::value) + 1)’ is not a valid template argument for
type ‘int’ because it is a non-constant expression
/usr/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of
‘mpl_::int_<1>’:
/usr/include/boost/mpl/not.hpp:47:   instantiated from here
/usr/include/boost/mpl/aux_/integral_wrapper.hpp:73: error:
‘(((int)mpl_::int_<1>::value) - 1)’ is not a valid template argument for
type ‘int’ because it is a non-constant expression
/usr/include/boost/mpl/if.hpp: In instantiation of
‘boost::mpl::if_<boost::integral_constant<bool, false>,
boost::optional_detail::types_when_is_ref<std::locale>,
boost::optional_detail::types_when_isnt_ref<std::locale> >’:
/usr/include/boost/optional/optional.hpp:152:   instantiated from
‘boost::optional_detail::optional_base<std::locale>’
/usr/include/boost/optional/optional.hpp:407:   instantiated from
‘boost::optional<std::locale>’
/usr/include/boost/format/internals.hpp:56:   instantiated from here
/usr/include/boost/mpl/if.hpp:67: error: ‘mpl_::bool_<false>::value’ is not
a valid template argument for type ‘bool’ because it is a non-constant
expression
/usr/include/boost/mpl/if.hpp: In instantiation of
‘boost::mpl::if_<boost::integral_constant<bool, false>,
boost::optional_detail::types_when_is_ref<std::locale>,
boost::optional_detail::types_when_isnt_ref<std::locale> >’:
/usr/include/boost/optional/optional.hpp:152:   instantiated from
‘boost::optional_detail::optional_base<std::locale>’
/usr/include/boost/optional/optional.hpp:407:   instantiated from
‘boost::optional<std::locale>’
/usr/include/boost/format/internals.hpp:56:   instantiated from here
/usr/include/boost/mpl/if.hpp:70: error: ‘mpl_::bool_<false>::value’ is not
a valid template argument for type ‘bool’ because it is a non-constant
expression
/usr/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of
‘mpl_::integral_c<unsigned int, 4u>’:
/usr/include/boost/type_traits/integral_constant.hpp:21:   instantiated from
‘boost::integral_constant<unsigned int, 4u>’
/usr/include/boost/type_traits/alignment_of.hpp:61:   instantiated from
‘boost::alignment_of<std::locale>’
/usr/include/boost/optional/optional.hpp:97:   instantiated from
‘boost::optional_detail::aligned_storage<std::locale>::dummy_u’
/usr/include/boost/optional/optional.hpp:98:   instantiated from
‘boost::optional_detail::aligned_storage<std::locale>’
/usr/include/boost/optional/optional.hpp:400:   instantiated from
‘boost::optional_detail::optional_base<std::locale>’
/usr/include/boost/optional/optional.hpp:407:   instantiated from
‘boost::optional<std::locale>’
/usr/include/boost/format/internals.hpp:56:   instantiated from here
/usr/include/boost/mpl/aux_/integral_wrapper.hpp:72: error: ‘(((unsigned
int)mpl_::integral_c<unsigned int, 4u>::value) + 1u)’ is not a valid template
argument for type ‘unsigned int’ because it is a non-constant expression
/usr/include/boost/mpl/aux_/integral_wrapper.hpp: In instantiation of
‘mpl_::integral_c<unsigned int, 4u>’:
/usr/include/boost/type_traits/integral_constant.hpp:21:   instantiated from
‘boost::integral_constant<unsigned int, 4u>’
/usr/include/boost/type_traits/alignment_of.hpp:61:   instantiated from
‘boost::alignment_of<std::locale>’
/usr/include/boost/optional/optional.hpp:97:   instantiated from
‘boost::optional_detail::aligned_storage<std::locale>::dummy_u’
/usr/include/boost/optional/optional.hpp:98:   instantiated from
‘boost::optional_detail::aligned_storage<std::locale>’
/usr/include/boost/optional/optional.hpp:400:   instantiated from
‘boost::optional_detail::optional_base<std::locale>’
/usr/include/boost/optional/optional.hpp:407:   instantiated from
‘boost::optional<std::locale>’
/usr/include/boost/format/internals.hpp:56:   instantiated from here
/usr/include/boost/mpl/aux_/integral_wrapper.hpp:73: error: ‘(((unsigned
int)mpl_::integral_c<unsigned int, 4u>::value) - 1u)’ is not a valid template
argument for type ‘unsigned int’ because it is a non-constant expression
/usr/include/boost/optional/optional.hpp: In instantiation of
‘boost::optional_detail::aligned_storage<std::locale>::dummy_u’:
/usr/include/boost/optional/optional.hpp:98:   instantiated from
‘boost::optional_detail::aligned_storage<std::locale>’
/usr/include/boost/optional/optional.hpp:400:   instantiated from
‘boost::optional_detail::optional_base<std::locale>’
/usr/include/boost/optional/optional.hpp:407:   instantiated from
‘boost::optional<std::locale>’
/usr/include/boost/format/internals.hpp:56:   instantiated from here
/usr/include/boost/optional/optional.hpp:97: error:
‘mpl_::integral_c<unsigned int, 4u>::value’ is not a valid template
argument for type ‘unsigned int’ because it is a non-constant expression
/usr/include/boost/format/internals.hpp: In member function ‘void
boost::io::detail::stream_format_state<Ch, Tr>::apply_on(std::basic_ios<_CharT,
_Traits>&, boost::io::detail::locale_t*) const’:
/usr/include/boost/format/internals.hpp:119: error: ‘const class
boost::optional<std::locale>’ has no member named ‘get’
/usr/include/boost/format/format_implementation.hpp: In member function
‘boost::io::detail::locale_t boost::basic_format<Ch, Tr, Alloc>::getloc()
const’:
/usr/include/boost/format/format_implementation.hpp:56: error: ‘const class
boost::optional<std::locale>’ has no member named ‘get’
/usr/include/boost/optional/optional.hpp: In member function ‘void
boost::optional_detail::optional_base<T>::destroy_impl(mpl_::false_) [with T =
std::locale]’:
/usr/include/boost/optional/optional.hpp:362:   instantiated from ‘void
boost::optional_detail::optional_base<T>::destroy() [with T = std::locale]’
/usr/include/boost/optional/optional.hpp:208:   instantiated from
‘boost::optional_detail::optional_base<T>::~optional_base() [with T =
std::locale]’
/usr/include/boost/optional/optional.hpp:471:   instantiated from
‘boost::optional<T>::~optional() [with T = std::locale]’
/usr/include/boost/format/format_fwd.hpp:30:   instantiated from here
/usr/include/boost/optional/optional.hpp:388: error: ‘get_ptr_impl’ was not
declared in this scope


-- 
           Summary: Fails to compile C++ code when -frepo is specified.
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rleigh at debian dot org
 GCC build triplet: powerpc-unknown-linux-gnu
  GCC host triplet: powerpc-unknown-linux-gnu
GCC target triplet: powerpc-unknown-linux-gnu


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


Reply via email to