If we are writing programs to write to arbitrary memory, wouldn't it be easier to write them in C? :)
int main(int argc, char *argv) {
*((char *)addr_to_write) = val_to_write;
}
On a more serious note: this is a fun compiler bug, but I wouldn't call it a valid exploit. If you have the power to run your own binary on a system, then of course you can write to any memory the process has access to.