[Piglit] [PATCH] Add tests for function calls

Matt Arsenault arsenm2 at gmail.com
Mon Sep 18 17:43:28 UTC 2017

> On Sep 17, 2017, at 19:22, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> On Sun, 2017-09-17 at 17:02 -0700, Matt Arsenault wrote:
>>> On Sep 16, 2017, at 20:15, Jan Vesely <jan.vesely at rutgers.edu> wrote:
>>> afaik, noinline is not defined in CLC, so it should be ifdefed on
>>> __clang__
>> It’s not, but my reading of the standard is that it’s required to
>> parse any unknown attributes and ignore them. ifdef clang would be
>> too restrictive (e.g. it wouldn’t work with the old EDG frontend)
> OK, if it helps. ignoring/warning is sensible compiler behaviour.
> I haven't found anything about unknown attributes in the specs (CLC or
> GCC), so technically it should be UB.
> Jan
> -- 
> Jan Vesely <jan.vesely at rutgers.edu>

6.11.5 in the 1.2 spec says:
Attributes are intended as useful hints to the compiler. It is our intention that a particular implementation of OpenCL be free to ignore all attributes and the resulting executable binary will produce the same result. This does not preclude an implementation from making use of the additional information provided by attributes and performing optimizations or other transformations as it sees fit. In this case it is the programmer’s responsibility to guarantee that the information provided is in some sense correct. 

My interpretation is it should be OK to ignore unknown attributes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20170918/a00c9121/attachment.html>

More information about the Piglit mailing list