This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/68896] [ARM] target attribute ignored
- From: "chrbr at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Dec 2015 10:23:33 +0000
- Subject: [Bug target/68896] [ARM] target attribute ignored
- Auto-submitted: auto-generated
- References: <bug-68896-4 at http dot gcc dot gnu dot org/bugzilla/>
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.