Thanks again for your help! I think the remaining issues are not with the compiler. >> For a somewhat longer example, even when compiled with >> -foffload=-lgfortran >> I now get >> unresolved symbol _gfortran_os_error >> collect2: error: ld returned 1 exit status >> I suspect this is a similar problem? > > I think that's a different problem, but I'm not so familiar with > libgfortran. I think the function should be implemented in the > so-called "minimal" libgfortran runtime. It is contained in the minimal.o section of libgfortran for the target. I mixed up the many options I tried and error messages I've seen. For completeness: The error unresolved symbol _gfortran_os_error collect2: error: ld returned 1 exit status goes away using -foffload=-lgfortran. What then showed up was an error relating to a write statement unresolved symbol _gfortran_st_write_done collect2: error: ld returned 1 exit status which is bound to be a coding error. There was a write statement inside a target region. Thanks again! Dirk