Not sure if this is a bug (probably not even), but reporting it
here anyway on request of pinskia after I asked him about it online.

I used to be able to compile the following with 3.3.3:

  poly left = (x2 + b) * x + a;

where all variables involved are of type 'poly'.
With 3.4.2 I get this error:

 ../../../libecc/testsuite/point/pointTest.cc:190: error: no match for
'operator*' in 'libecc::operator+ [with unsigned int m = 5u, unsigned int k =
2u](((const libecc::polynomial<5u, 2u>&)((const libecc::polynomial<5u,
2u>*)(+x2))), ((const libecc::polynomial<5u, 2u>&)((const libecc::polynomial<5u,
2u>*)(&b)))) * x'

And, in order for it compile I have to use split up the
expression like this:

  poly const& tmp1 = (x2 + b);
  poly left = tmp1 * x + a;

I've attached the full preprocessed source with stripped line numbers.
The results with that file are as follows:

$ /usr/local/gcc-3.3.3/lib/gcc-lib/i686-redhat-linux/3.3.3/cc1plus
-fpreprocessed pointTest.ii -quiet -dumpbase pointTest.cc -auxbase-strip
pointTest.o -g -version -o pointTest.s
GNU C++ version 3.3.3 (i686-redhat-linux)
        compiled by GNU C version 3.3.3.
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=113264

(no errors), and:

$ /usr/local/gcc-3.4.2/libexec/gcc/i686-redhat-linux/3.4.2/cc1plus
-fpreprocessed pointTest.ii -quiet -dumpbase pointTest.cc -auxbase-strip
pointTest.o -g -version -o pointTest.s
GNU C++ version 3.4.2 (i686-redhat-linux)
        compiled by GNU C version 3.4.2.
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=113264
pointTest.ii: In function `int main()':
pointTest.ii:41496: error: no match for 'operator*' in 'libecc::operator+ [with
unsigned int m = 5u, unsigned int k = 2u](((const libecc::polynomial<5u,
2u>&)((const libecc::polynomial<5u, 2u>*)(+x2))), ((const libecc::polynomial<5u,
2u>&)((const libecc::polynomial<5u, 2u>*)(&b)))) * x'
pointTest.ii:41502: error: no match for 'operator==' in 'left ==
libecc::operator+ [with unsigned int m = 5u, unsigned int k = 2u](((const
libecc::polynomial<5u, 2u>&)((const libecc::polynomial<5u, 2u>*)(+y2))), ((const
libecc::polynomial<5u, 2u>&)((const libecc::polynomial<5u,
2u>*)(&libecc::operator*(const libecc::polynomial<m, k>&, const
libecc::polynomial<m, k>&) [with unsigned int m = 5u, unsigned int k =
2u](((const libecc::polynomial<5u, 2u>&)((const libecc::polynomial<5u,
2u>*)(&y))))))))'
pointTest.ii:29745: note: candidates are: bool libecc::operator==(const
libecc::bitset_index&, const libecc::bitset_index&)

Attaching pointTest.ii.bz2 in a minute.

-- 
           Summary: Possible regression with error no match for 'operator*'
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: carlo at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-redhat-linux


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

Reply via email to