Re: constexpr vector indexing

2013-07-08 Thread Jason Merrill
On 07/07/2013 11:54 AM, Marc Glisse wrote: it turns out there wasn't much missing here. I got side-tracked because fold_unary_loc doesn't call fold_indirect_ref_1, and fold_indirect_ref_1 has a too strict comparison type == TREE_TYPE (optype) (should compare TYPE_MAIN_VARIANT instead?), but none

Re: constexpr vector indexing

2013-07-07 Thread Marc Glisse
On Sun, 7 Jul 2013, Gabriel Dos Reis wrote: On Sun, Jul 7, 2013 at 10:54 AM, Marc Glisse wrote: Hello, it turns out there wasn't much missing here. I got side-tracked because fold_unary_loc doesn't call fold_indirect_ref_1, and fold_indirect_ref_1 has a too strict comparison type == TREE_TYPE

Re: constexpr vector indexing

2013-07-07 Thread Gabriel Dos Reis
On Sun, Jul 7, 2013 at 10:54 AM, Marc Glisse wrote: > Hello, > > it turns out there wasn't much missing here. I got side-tracked because > fold_unary_loc doesn't call fold_indirect_ref_1, and fold_indirect_ref_1 has > a too strict comparison type == TREE_TYPE (optype) (should compare > TYPE_MAIN_V

constexpr vector indexing

2013-07-07 Thread Marc Glisse
Hello, it turns out there wasn't much missing here. I got side-tracked because fold_unary_loc doesn't call fold_indirect_ref_1, and fold_indirect_ref_1 has a too strict comparison type == TREE_TYPE (optype) (should compare TYPE_MAIN_VARIANT instead?), but none of that was necessary so I'll lea