[Bug c++/40055] Failing instantiation of template with enums

2009-05-07 Thread alexandre dot hamez at gmail dot com


--- Comment #1 from alexandre dot hamez at gmail dot com  2009-05-07 09:45 
---
Created an attachment (id=17816)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17816action=view)
Associated temporary file


-- 


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



[Bug c++/40055] New: Failing instantiation of template with enums

2009-05-07 Thread alexandre dot hamez at gmail dot com
The  following code failed with the message (no options are given to the
compiler): 

instance.cc: In function 'int main()':
instance.cc:30: error: no matching function for call to 'c_structa_tags,
a_struct::c_struct(a0_type)'
instance.cc:14: note: candidates are: c_structa_tags,
a_struct::c_struct(const c_structa_tags, a_struct)

---

enum a_tags { A0, A1 };
enum b_tags { B0, B1 };

template  a_tags Tag 
struct a_struct
{};

template  b_tags Tag 
struct b_struct
{};

template  typename tags, template  tags  class Element 
struct c_struct
{
  template  tags Tag 
  c_struct(Element Tag )
  {}
};

typedef c_struct a_tags, a_struct  a_type;
typedef c_struct b_tags, b_struct  b_type;
typedef a_struct A0  a0_type;
typedef b_struct B0  b0_type;

int main()
{
  a0_type a0;
  b0_type b0;
  b_type b_instance(b0);
  a_type a_instance(a0);
}

--

But if one of the line:
b_type b_instance(b0);
a_type a_instance(a0);
is commented out, then the compilation succeeds.

---
My g++ version, although I've been able to reproduce this bug with older
versions of gcc:
% /usr/local/env/gcc-4.4.0/bin/g++ -v 
Using built-in specs.
Target: i386-apple-darwin9.6.0
Configured with: ../gcc-4.4.0/configure --prefix=/usr/local/env/gcc-4.4.0
--disable-nls --enable-languages=c,c++
Thread model: posix
gcc version 4.4.0 (GCC)


-- 
   Summary: Failing instantiation of template with enums
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: alexandre dot hamez at gmail dot com
 GCC build triplet: i386-apple-darwin9.6.0
  GCC host triplet: i386-apple-darwin9.6.0
GCC target triplet: i386-apple-darwin9.6.0


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



[Bug c++/36985] New: initialize_flags_in_bb, at tree-into-ssa.c:437

2008-07-31 Thread alexandre dot hamez at gmail dot com
GCC:

% /usr/local/gcc-4.3.1/bin/g++-4.3.1 -v 
Using built-in specs.
Target: i386-apple-darwin9.3.0
Configured with: ../gcc-4.3.1/configure --disable-nls --enable-languages=c,c++
--program-suffix=-4.3.1 --prefix=/usr/local/gcc-4.3.1
Thread model: posix
gcc version 4.3.1 (GCC) 



System:

Darwin 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun  9 19:30:53 PDT 2008;
root:xnu-1228.5.20~1/RELEASE_I386 i386


Command-line:

/usr/local/gcc-4.3.1/bin/g++-4.3.1  -o opt -DNDEBUG  -O3  -Wall -Wextra
test/bench.cc -I . -ltbb -lgmp -lgmpxx -mtune=native -march=native -fipa-cp
-fipa-pta -ftree-loop-linear -ftree-loop-im -funswitch-loops -fivopts
-ftree-parallelize-loops=2 -ftree-vectorize -funroll-loops -fwhole-program
-ffast-math


Output:

/usr/local/include/boost/variant/variant.hpp: In member function 'typename
Visitor::result_type
boost::detail::variant::invoke_visitorVisitor::internal_visit(T, int) [with
T = const xxx::core::unicity::nodexxx::configuration::uchar_ushort_mono,
Visitor = const
xxx::util::count_visitorxxx::configuration::uchar_ushort_mono]':
/usr/local/include/boost/variant/variant.hpp:804: internal compiler error: in
initialize_flags_in_bb, at tree-into-ssa.c:437


-- 
   Summary: initialize_flags_in_bb, at tree-into-ssa.c:437
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: alexandre dot hamez at gmail dot com


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



[Bug c++/36985] initialize_flags_in_bb, at tree-into-ssa.c:437

2008-07-31 Thread alexandre dot hamez at gmail dot com


--- Comment #1 from alexandre dot hamez at gmail dot com  2008-07-31 10:41 
---
I don't how to attach the preprocessed source. The file weight more than 1000k
so it is refused by bugzilla. And I think that copy-paste 56000 lines of code
is not the right thing to do?
At least, it seams that is is related to boost.


-- 


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



[Bug c++/36985] initialize_flags_in_bb, at tree-into-ssa.c:437

2008-07-31 Thread alexandre dot hamez at gmail dot com


--- Comment #3 from alexandre dot hamez at gmail dot com  2008-07-31 11:33 
---
Created an attachment (id=15983)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15983action=view)
Preprocessed sources.


-- 


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