Yes, it compiles. Here is a trimmed-down version of the code I am trying to compile. The goal is to subset the vector M as part of an effort to generate a prior predictive distribution. I am running rstan Version 2.21.2 on R V4.0.3, all on Linux Mint 20.

```
test <- "
functions {
int count_urn(int[] sub,vector[] dT,int index) {
int count;
count = 0;
for(i in 1:num_elements(sub)) {
if(sub[i] == index) {
if(dT[i] > 0.0) {
count = count + 1;
}
}
}
return(count);
}
int[] indu(int[] sub,vector[] dT,int index) {
int res[count_urn(sub,dT,index)];
int ci;
ci = 1;
for(i in 1:num_elements(sub)) {
if(sub[i]==index) {
if(dT[i] > 0.0) {
res[ci] = i;
ci = ci + 1;
}
}
}
return(res);
}
}
data {
int sub[100];
vector[100] dT;
}
generated quantities{
vector[100] M;
M[indu(sub,dT,11)];
}
"
stan_model(model_code=test,verbose=TRUE)
```

The error issued by the compiler is

```
TRANSLATING MODEL '93da0f9f7e830d4636774afc0967dc4e' FROM Stan CODE TO C++ CODE NOW.
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
Binary infix operator >= with functional interpretation logical_gt requires arguments of primitive type (int or real), found left type=vector, right arg type=real.
No matches for:
logical_gt(vector, real)
Available argument signatures for logical_gt:
logical_gt(int, int)
logical_gt(int, real)
logical_gt(real, int)
logical_gt(real, real)
Conditions in if-else statement must be primitive int or real; found type=ill-formed
error in 'modeledf5fe5354e_93da0f9f7e830d4636774afc0967dc4e' at line 10, column 9
-------------------------------------------------
8: for(i in 1:num_elements(sub)) {
9: if(sub[i] == index) {
10: if(dT[i] > 0.0) {
^
11: count = count + 1;
-------------------------------------------------
PARSER EXPECTED: <expression>
Error in stanc(file = file, model_code = model_code, model_name = model_name, :
failed to parse Stan model '93da0f9f7e830d4636774afc0967dc4e' due to the above error.
```