More illuminating error with stanc2:

```
Unrecoverable error evaluating the log probability at the initial value.
Exception: assign: Rows of left-hand-side (5524) and rows of right-hand-side (30514576) must match in size (in 'examples/Test/F1_Base_to_vector.stan' at line 63)
```

I had a look through the generated c++, and (I think) the vector is being declared and initialised correctly:

## stanc3

```
Eigen::Matrix<local_scalar_t__, -1, 1> yst_tmp;
yst_tmp = Eigen::Matrix<local_scalar_t__, -1, 1>(M);
for (size_t sym1__ = 1; sym1__ <= M; ++sym1__) {
current_statement__ = 42;
assign(yst_tmp, cons_list(index_uni(sym1__), nil_index_list()),
std::numeric_limits<double>::quiet_NaN(),
"assigning variable yst_tmp");}
```

Then the assign:

```
assign(yst_tmp, nil_index_list(),
to_vector(
rvalue(ystar,
cons_list(index_multi(ii),
cons_list(index_multi(jj), nil_index_list())), "ystar")),
"assigning variable yst_tmp");
```

## stanc2

```
Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> yst_tmp(M);
stan::math::initialize(yst_tmp, DUMMY_VAR__);
stan::math::fill(yst_tmp, DUMMY_VAR__);
```

Then the assign:

```
stan::math::assign(yst_tmp, to_vector(stan::model::rvalue(ystar, stan::model::cons_list(stan::model::index_multi(ii), stan::model::cons_list(stan::model::index_multi(jj), stan::model::nil_index_list())), "ystar")));
```