Under the C standard, you are allowed to declare an array with register storage class, but it's basically useless; any attempt to use that array to form a pointer, much less to dereference that pointer (to access an element of the array), causes undefined behavior. C17 (n2176) 6.3.2.1 (3):
Except when it is the operand of the sizeof operator, or the unary & operator, or is a string literal
used to initialize an array, an expression that has type “array of type” is converted to an expression
with type “pointer to type” that points to the initial element of the array object and is not an lvalue.
If the array object has register storage class, the behavior is undefined.
In fact, as emphasized in footnote 123 to 6.7.1 (6), pretty much the only thing you can legally do to a register array is to take sizeof of it.
So your example has undefined behavior; it's completely up to the compiler to decide what to do with it. One reasonable choice, and what yours probably does, is to just ignore the register keyword and treat the array like any other array. This is sensible because modern compilers ignore the register keyword in practically every other situation anyway, and make their own decisions when to optimize a variable into a register or not. The one thing it's not allowed to ignore is an attempt to apply the & operator, because that's a constraint violation by 6.5.3.2 (1), and this explains why you get an error when you try to do that.