https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21802

David Abdurachmanov <david.abdurachmanov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david.abdurachmanov at gmail 
dot c
                   |                            |om

--- Comment #8 from David Abdurachmanov <david.abdurachmanov at gmail dot com> 
---
While looking at the last compilation issues while reg testing GCC 6.0.0, I
bumped into this one. The code compiles file with GCC 5.3.0. The code compiles
fine with Clang 3.7.0 (have not checked 3.8.0 or ICC yet, but can be done on
request).

git bisect pointed me to this fix (full bisect log is below).

d175f0193ed47b61eafd213ca2d3dde73f8f5996 is the first bad commit
commit d175f0193ed47b61eafd213ca2d3dde73f8f5996
Author: ppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Tue Dec 15 03:33:53 2015 +0000

    Fix PR c++/21802 (two-stage name lookup fails for operators)

Failing file (pre-processed) is attached and I am running C-Reduce to get
something more minimal. I am currently not sure if this a compiler issue or not
thus not creating a separate BZ item.

### COMPILE LINE ###

c++ -c -ansi -fPIC -O2  Algorithm.ii

Removing -ansi seems to solve compilation issue.

### ERROR ### 

Algorithm.cc: In instantiation of 'Algorithm::grammar<Iterator>::grammar()
[with Iterator = __gnu_cxx::__normal_iterator<const char*,
std::basic_string<char> >]':
Algorithm.cc:119:11:   required from here
Algorithm.cc:76:16: error: invalid initialization of non-const reference of
type 'boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::terminal_ex<boost::spirit::tag::char_code<boost::spirit::tag::char_,
boost::spirit::char_encoding::standard>, boost::fusion::vector1<const char
(&)[19]> > >, 0l>&' from an rvalue of type
'boost::spirit::terminal<boost::spirit::tag::char_code<boost::spirit::tag::char_,
boost::spirit::char_encoding::standard> >::result<char [19],
boost::spirit::unused_type, boost::spirit::unused_type>::type {aka
boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::terminal_ex<boost::spirit::tag::char_code<boost::spirit::tag::char_,
boost::spirit::char_encoding::standard>, boost::fusion::vector1<const char
(&)[19]> > >, 0l>}'
       = lexeme[+char_("a-zA-Z0-9{}[],_.+-")]
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/home/david.abdurachmanov/gcc600/test/fc22_ppc64le_gcc600/external/boost/1.57.0/include/boost/proto/core.hpp:26:0,
                 from
/home/david.abdurachmanov/gcc600/test/fc22_ppc64le_gcc600/external/boost/1.57.0/include/boost/proto/proto.hpp:12,
                 from
/home/david.abdurachmanov/gcc600/test/fc22_ppc64le_gcc600/external/boost/1.57.0/include/boost/spirit/home/support/meta_compiler.hpp:19,
                 from
/home/david.abdurachmanov/gcc600/test/fc22_ppc64le_gcc600/external/boost/1.57.0/include/boost/spirit/home/qi/meta_compiler.hpp:14,
                 from
/home/david.abdurachmanov/gcc600/test/fc22_ppc64le_gcc600/external/boost/1.57.0/include/boost/spirit/home/qi/action/action.hpp:14,
                 from
/home/david.abdurachmanov/gcc600/test/fc22_ppc64le_gcc600/external/boost/1.57.0/include/boost/spirit/home/qi/action.hpp:14,
                 from
/home/david.abdurachmanov/gcc600/test/fc22_ppc64le_gcc600/external/boost/1.57.0/include/boost/spirit/home/qi.hpp:14,
                 from
/home/david.abdurachmanov/gcc600/test/fc22_ppc64le_gcc600/external/boost/1.57.0/include/boost/spirit/include/qi.hpp:16,
                 from Algorithm.cc:7:

/home/david.abdurachmanov/gcc600/test/fc22_ppc64le_gcc600/external/boost/1.57.0/include/boost/proto/operators.hpp:116:5:
note:   initializing argument 1 of 'const typename
boost::proto::detail::enable_unary<boost::proto::domainns_::deduce_domain,
boost::proto::detail::not_a_grammar, boost::proto::is_extension<Arg>,
boost::proto::tagns_::tag::unary_plus, Arg&>::type
boost::proto::exprns_::operator+(Arg&) [with Arg =
boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::terminal_ex<boost::spirit::tag::char_code<boost::spirit::tag::char_,
boost::spirit::char_encoding::standard>, boost::fusion::vector1<const char
(&)[19]> > >, 0l>; typename
boost::proto::detail::enable_unary<boost::proto::domainns_::deduce_domain,
boost::proto::detail::not_a_grammar, boost::proto::is_extension<Arg>,
boost::proto::tagns_::tag::unary_plus, Arg&>::type =
boost::proto::exprns_::expr<boost::proto::tagns_::tag::unary_plus,
boost::proto::argsns_::list1<boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal,
boost::proto::argsns_::term<boost::spirit::terminal_ex<boost::spirit::tag::char_code<boost::spirit::tag::char_,
boost::spirit::char_encoding::standard>, boost::fusion::vector1<const char
(&)[19]> > >, 0l>&>, 1l>]'
     operator OP(Arg &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST)            
                     \
     ^
/home/david.abdurachmanov/gcc600/test/fc22_ppc64le_gcc600/external/boost/1.57.0/include/boost/proto/operators.hpp:236:5:
note: in expansion of macro 'BOOST_PROTO_DEFINE_UNARY_OPERATOR'
     BOOST_PROTO_DEFINE_UNARY_OPERATOR(+, boost::proto::tag::unary_plus, TRAIT,
DOMAIN, 0)           \
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/david.abdurachmanov/gcc600/test/fc22_ppc64le_gcc600/external/boost/1.57.0/include/boost/proto/operators.hpp:295:9:
note: in expansion of macro 'BOOST_PROTO_DEFINE_OPERATORS'
         BOOST_PROTO_DEFINE_OPERATORS(is_extension, deduce_domain)
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

### BISECT LOG ###

git bisect start
# good: [c05c1b41d370b14bc94421f138d13e76831253d1] [5/n] Fix minor SSA_NAME
leaks
git bisect good c05c1b41d370b14bc94421f138d13e76831253d1
# bad: [078970398ca084fe81435464b0434dcdd4a56fc7] Daily bump.
git bisect bad 078970398ca084fe81435464b0434dcdd4a56fc7
# bad: [141d7d6e93a44d509f0be246231b46939e728c97] 2015-12-16  Richard Biener 
<rguent...@suse.de>
git bisect bad 141d7d6e93a44d509f0be246231b46939e728c97
# good: [296008a9d4e2305dbf691ffcae802abcb0fe29a9] missed error format change
in previous commit
git bisect good 296008a9d4e2305dbf691ffcae802abcb0fe29a9
# good: [5a9e96d29263540947275d331b2b3efc0b0b4536] [AArch64] Add builtins for
ARMv8.1 Adv.SIMD instructions.
git bisect good 5a9e96d29263540947275d331b2b3efc0b0b4536
# good: [5112baa282300206972a4b3993f93c1847d24b6a]      PR ada/49944    *
s-osinte-freebsd.ads: Minor reformatting.     (Stack_Base_Available): Correct
comments.       * s-osinte-kfreebsd-gnu.ads (Time_Slice_Supported, nanosleep,  
clock_id_t, clock_gettime, Stack_Base_Available, Get_Page_Size,       mprotect,
pthread_mutexattr_setprotocol,pthread_mutexattr_getprotocol  
pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling,    
pthread_attr_setscope, pthread_attr_getscope,   pthread_attr_setinheritsched,
pthread_attr_getinheritsched,   Time_Slice_Supported): Copy from
s-osinte-freebsd.ads.  * gcc-interface/Makefile.in (x86/kfreebsd): Use the
POSIX version of    the System.Task_Primitives.Operations package.
git bisect good 5112baa282300206972a4b3993f93c1847d24b6a
# good: [c34c9fe941f64f9597535bab54a77789a28ed368] [install.texi] Add note
against GNAT 4.8 on ARM targets
git bisect good c34c9fe941f64f9597535bab54a77789a28ed368
# good: [d9102cbe7b9f5d81fcb2266709bc3c2377e255df] 2014-12-12  Tobias Burnus 
<bur...@net-b.de>
git bisect good d9102cbe7b9f5d81fcb2266709bc3c2377e255df
# good: [be5e9c7f19faf226f62f16cc7c06789962c05291] Dump default defs for
arguments, static chain and decl-by-reference
git bisect good be5e9c7f19faf226f62f16cc7c06789962c05291
# bad: [8f46e324136bff10a7a7d66fda9c094b29f99673]       * config/nvptx/nvptx.h
(HARD_REGNO_NREGS): Reformat.    (CANNOT_CHANGE_MODE_CLASS): Always return
true.         (HARD_REGNO_MODE_OK): Reformat.         * config/nvptx/nvptx.md
(define_expand mov<mode>): No   RETURN_REGNUM handling here.  *
config/nvptx/nvptx.c (nvptx_function_value): Set ret_reg_mode         here.  
(write_one_arg): No QI or HI mode args.         (write_fn_proto_from_insn): No
argument promotion here.         (nvptx_output_return_insn): No return
promotion here. (nvptx_output_mov_insn): No RETURN_REGNUM handling needed.     
(nvptx_output_call_insn): No return promotion here.
git bisect bad 8f46e324136bff10a7a7d66fda9c094b29f99673
# bad: [d175f0193ed47b61eafd213ca2d3dde73f8f5996] Fix PR c++/21802 (two-stage
name lookup fails for operators)
git bisect bad d175f0193ed47b61eafd213ca2d3dde73f8f5996
# good: [47e60890a8042ba8ff986955f04063a432220e9e] 2015-12-14  Steve Ellcey 
<sell...@imgtec.com>
git bisect good 47e60890a8042ba8ff986955f04063a432220e9e
# good: [fe1d8e2fd875cf337d74ff4d25522efe7b715d63] Daily bump.
git bisect good fe1d8e2fd875cf337d74ff4d25522efe7b715d63
# good: [96c393ed7040fb066d7a94c5a87d869586c4ae55] 2015-12-14  Jerry DeLisle 
<jvdeli...@gcc.gnu.org>
git bisect good 96c393ed7040fb066d7a94c5a87d869586c4ae55

Reply via email to