AtTiny85 analog / digital pin configuration order in setup
It should be noted that ATtiny is not supported by Arduino IDE out of the box. There are several third-party implementations (e.g. 1, 2, 3) which provide necessary files (mostly pin definitions) for Arduino, and you didn't tell us which one you're using.

The error looks like the implementation you're using has screwed up pin mask definitions, since applying the right mask directly in your code works. You should check the code you end up compiling (specifically the constants used in pinMode() function) for obvious errors. There are makefiles for Arduino (e.g. arduino-mk) which can be instructed to provide you with the preprocessed *.cpp file, as seen by the compiler. I always prefer looking into those, because they represent the real code, after all the tricks that Arduino IDE pulls out.

If doing that sounds too hard, I suggest you file a bug to the developer of the implementation you're using. Or just pick a different implementation, which will probably have a different set of bugs.

Compiler bug seems unlikely, because compilers are usually rigorously tested before they are released, unlike amateur projects on github.