This may seams niptiking but ... many answer speak about "memory allocated by the compiler": that's not actually true: the memory is given by the OS to the process that runs the program, not by the compiler.
The compiler, in fact, stores the literals into a part of the executable file whose offset is made known to the linker, that gives those offsets to a "startup function".
When the program is "lauched" the OS loads the file in memory, adds all the offsets to the load address, thus converting all offset into addresses, crates the "stack" than calls the startup function.
The startup function crates the "heap", calls all the global & static object's constructors and calls main. At this point "Check" is just a sequence of bytes starting at a given address. That address is the one that is given to str.
Hence, the memory is not "allocated by the compiler". It is allocated during the program startup phase, and initialized with the data previously saved by the compiler.