I get the same message. Well, Block has no purpose in this test code. I would use Block together with other instructions that would run faster if I could compile them. The function I want to compile is
SP[k_, d_, s_] := Block[{sum, ls, ln, zeros, part, t, numP},
sum = 0.;
Do[
ls = IntegerPartitions[s, {i}, Range[d]]; ln = Length[ls];
Do[
part = Join[ConstantArray[0, k - Length[ls[[j]]]], ls[[j]]];
t = Tally[part];
numP = k!/Product[t[[l, 2]]!, {l, 1, Length[t]}];
sum = sum + numP*Apply[Times, Map[y, part]],
{j, 1, ln}],
{i, 1, k}];
Return[sum]];
Map[y, part] has still to be replaced with Table[y[[i + 1]], {i, part}], otherwise it cannot be compiled. This code calculates the sum of all y[s1] * y[s2] * ... * y[sk] where the si satisfy s1 +...+ sk = s and 0 <= si <= d. The y are a binomial distribution. Have you an idea how this can be compiled?