On Fri, Jan 15, 2016 at 04:08:14PM +0100, Martin Jambor wrote: > We don't error, apart from issuing a warning we basically ignore them. > I believe we can do it even in the long term and that it is in fact > useful because the standard says that the "effect" if these routines > is "unspecified" if they get called from a target region. > > Perhaps this is even something we should warn about earlier in omp > lowering/expansion.
Well, only some of the omp.h functions are not allowed to be called from the target regions, others are. For the others that have unspecified behavior, there is always the question when it is desirable to warn. In target construct body it might be a warning candidate, the only possibility that it is not invoking unspec behavior is if the target construct is not encountered, if it is in dead code in that body, or just never encountered. But if you have declare target routine, it is more controversial to warn, because the routine can be run both on host (where it is fine) and on target (where it is not), whether it calls the argument e.g. could depend on some parameter or result of some function (say check whether it is in offloaded region). Anyway, thanks for fixing this, the patch is ok for trunk. And after the commit you're the maintainer, so it is up to you to review further changes to it. Please keep it nicely and consistently formatted in the future ;) Jakub