There's a bug in the code. Programmers call this a runtime error. Just because a program compiles doesn't mean that it will run as expected. Consult the author of the program and try to find a solution. There may be missing compiler options that are needed to get working code, but we wouldn't be able to help with that, only the author.
Don't know about Fortran (haven't touched it for 20 years), but with C / C++ (etc) you normal use the compiler to create object modules, then use ld to link them to the run-time libraries and start-up code...
I've always used tools like Automake to build makefiles that do the dirty work.
Gcc automatically compiles, assembles, and links if you don't tell it to do otherwise. So the command in the op would have produced the executable. (It wouldn't have run far enough to die with an illegal instruction if it hadn't been properly linked.)