[Bug target/68896] [ARM] target attribute ignored
chrbr at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 15 10:23:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68896
--- Comment #2 from chrbr at gcc dot gnu.org ---
Currently not a bug, or rather implementation specified.
According to the documentation
6.61.15 Function Specific Option Pragmas
#pragma GCC target ("string"...)
...
Each function that is defined after this point is as if
attribute((target("STRING"))) was specified for that function
So here we have
#pragma GCC target ("fpu=vfp")
...
int8x8_t __attribute__ ((target("fpu=neon"))) my
so "my" is defined as if attribute((target("fpu=vfp"))) was specified.
Now, IMHO this is not intuitive since the attribute targets has a smaller
scope, it should have a higher priority. And the doc doesn't say if the
attribute target is inserted before or after the existing ones, in case of
conflict.
so literally not a bug, but I'd like to specify the order of insertion to solve
your current issue.
More information about the Gcc-bugs
mailing list