From a079f50a721208e94d23fee77ad77322ad1b74a8 Mon Sep 17 00:00:00 2001
From: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date: Thu, 24 Oct 2013 14:44:00 +0000
Subject: [PATCH] c-output-mod-2.c: Fix for -fPIC.

[gcc/testsuite/]
2013-10-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* gcc.target/aarch64/c-output-mod-2.c: Fix for -fPIC.
	* gcc.target/aarch64/c-output-mod-3.c: Likewise.

From-SVN: r204019
---
 gcc/testsuite/ChangeLog                               |  5 +++++
 .../gcc.target/aarch64/c-output-template-2.c          | 10 ++--------
 .../gcc.target/aarch64/c-output-template-3.c          | 11 +++--------
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 51f5e7c245c1..57862a73cc85 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+	* gcc.target/aarch64/c-output-mod-2.c: Fix for -fPIC.
+	* gcc.target/aarch64/c-output-mod-3.c: Likewise.
+
 2013-10-24  Nick Clifton  <nickc@redhat.com>
 
 	* gcc.dg/20020312-2.c: No PIC register for RL78 or MSP430.
diff --git a/gcc/testsuite/gcc.target/aarch64/c-output-template-2.c b/gcc/testsuite/gcc.target/aarch64/c-output-template-2.c
index 16ff58d9e283..ced96d04542f 100644
--- a/gcc/testsuite/gcc.target/aarch64/c-output-template-2.c
+++ b/gcc/testsuite/gcc.target/aarch64/c-output-template-2.c
@@ -1,15 +1,9 @@
 /* { dg-do compile } */
 
-struct tracepoint {
-    int dummy;
-    int state;
-};
-static struct tracepoint tp;
-
 void
 test (void)
 {
-    __asm__ ("@ %c0" : : "i" (&tp));
+    __asm__ ("@ %c0" : : "S" (test));
 }
 
-/* { dg-final { scan-assembler "@ tp" } } */
+/* { dg-final { scan-assembler "@ test" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/c-output-template-3.c b/gcc/testsuite/gcc.target/aarch64/c-output-template-3.c
index e332fe18fb9e..c28837cd501c 100644
--- a/gcc/testsuite/gcc.target/aarch64/c-output-template-3.c
+++ b/gcc/testsuite/gcc.target/aarch64/c-output-template-3.c
@@ -1,15 +1,10 @@
 /* { dg-do compile } */
-
-struct tracepoint {
-    int dummy;
-    int state;
-};
-static struct tracepoint tp;
+/* { dg-options "-Wno-pointer-arith" } */
 
 void
 test (void)
 {
-    __asm__ ("@ %c0" : : "i" (&tp.state));
+    __asm__ ("@ %c0" : : "S" (&test + 4));
 }
 
-/* { dg-final { scan-assembler "@ tp\\+4" } } */
+/* { dg-final { scan-assembler "@ test\\+4" } } */
-- 
GitLab