This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][AArch64][12/14] Target attributes and target pragmas tests



On 05/08/15 15:27, Andreas Schwab wrote:
Kyrill Tkachov <kyrylo.tkachov@arm.com> writes:

On 05/08/15 10:03, Andreas Schwab wrote:
Kyrill Tkachov <kyrylo.tkachov@arm.com> writes:

diff --git a/gcc/testsuite/gcc.target/aarch64/target_attr_1.c b/gcc/testsuite/gcc.target/aarch64/target_attr_1.c
new file mode 100644
index 0000000..72d0838
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/target_attr_1.c
@@ -0,0 +1,12 @@
+/* { dg-do assemble } */
+/* { dg-options "-O2 -mcpu=thunderx -save-temps" } */
+
+__attribute__ ((target ("cpu=cortex-a72.cortex-a53")))
+int
+foo (int a)
+{
+  return a + 1;
+}
+
+/* { dg-final { scan-assembler "//.tune cortex-a72.cortex-a53" } } */
+/* { dg-final { scan-assembler-not "thunderx" } } */
FAIL: gcc.target/aarch64/target_attr_1.c (test for excess errors)
Excess errors:
Assembler messages:
Error: unknown cpu `thunderx'
Error: unrecognized option -mcpu=thunderx
yeah, that happens if your assembler doesn't support -mcpu=thunderx.
Newer binutils should support it.
Then there probably needs to be a dg-require- test for it.

Or just make this a dg-compile test. I suppose the assemble step doesn't add
anything to this test.

Kyrill


Andreas.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]