On Fri, Jul 24, 2015 at 06:21:34PM +0300, Ilya Verbin wrote: > On Fri, Jul 24, 2015 at 08:05:00 -0700, Cesar Philippidis wrote: > > The second point is interesting. Offloaded functions require the "omp > > target" attribute or that function won't reach the lto compiler. That's > > fine because not all targets can handle general code. The problem occurs > > when a user forgets to bless a function as offloaded, which OpenACC > > allows. This patch teaches the lto-wrapper to error on unrecognized > > functions with flag_openacc or hit gcc_unreachable otherwise. I couldn't > > think of a way to test the lto error message because that involves > > having two compilers present. I wonder if it's ok to have libgomp check > > for compiler expected compiler errors? However, that's more of a > > gcc/testsuite type of check. > > > > I don't think trunk has much support for acc routines just yet, so I > > applied this patch to gomp-4_0-branch for now. > > OpenMP has similar issue.
Well, only for variables. For functions the spec does not require anything like that, you can supply the functions in some other way. Generally, e.g. libc or libm functions aren't all #pragma omp declare target marked, yet they are usually allowed. Jakub