symbian1.c: New test.
authorMark Mitchell <mark@codesourcery.com>
Tue, 3 Aug 2004 21:20:36 +0000 (21:20 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 3 Aug 2004 21:20:36 +0000 (21:20 +0000)
* gcc.dg/symbian1.c: New test.
* gcc.dg/symbian2.c: Likewise.

From-SVN: r85505

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/symbian1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/symbian2.c [new file with mode: 0644]

index 85dd35b19fbd39a9ee4cbf1a09836e70b5a807cc..72e026ca1311ce0d6d1e74d587b3a5c0d39b3ec5 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-03  Mark Mitchell  <mark@codesourcery.com>
+
+       * gcc.dg/symbian1.c: New test.
+       * gcc.dg/symbian2.c: Likewise.
+
 2004-08-03  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/16570
diff --git a/gcc/testsuite/gcc.dg/symbian1.c b/gcc/testsuite/gcc.dg/symbian1.c
new file mode 100644 (file)
index 0000000..25e8128
--- /dev/null
@@ -0,0 +1,11 @@
+/* { dg-do compile { target arm*-*-symbianelf* } } */
+/* Symbian OS requires that all defined symbols with external linkage
+   have the ELF STV_HIDDEN attribute set by default.  */
+/* { dg-final { scan-assembler ".hidden.*i" } } */
+/* { dg-final { scan-assembler ".hidden.*j" } } */
+/* { dg-final { scan-assembler ".hidden.*f" } } */
+
+int i;
+int j = 3;
+void f() {}
+
diff --git a/gcc/testsuite/gcc.dg/symbian2.c b/gcc/testsuite/gcc.dg/symbian2.c
new file mode 100644 (file)
index 0000000..9870163
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile { target arm*-*-symbianelf* } } */
+/* { dg-options "-O2" } */
+
+/* Symbian OS requires that builtins not be expanded by default.  Make
+   sure that a reference to "strlen" is emitted.  */
+/* { dg-final { scan-assembler "strlen" } } */
+
+int f() {
+  return strlen("abc");
+}