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]

PATCH: arm*-*-symbianelf* tests


This patch adds a couple of test cases for the Symbian OS specific
behavior in the arm*-*-symbianelf* port.  It's not clear -- yet -- if
these tests should also be run on SH Symbian OS.

Tested by running just tests tests with an ordinary i686-pc-linux-gnu
compiler (to confirm they are not actually executed) and an
arm-none-symbianelf compiler (to confirm that they pass).

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2004-08-03  Mark Mitchell  <mark@codesourcery.com>

	* gcc.dg/symbian1.c: New test.
	* gcc.dg/symbian2.c: Likewise.

Index: testsuite/gcc.dg/symbian1.c
===================================================================
RCS file: testsuite/gcc.dg/symbian1.c
diff -N testsuite/gcc.dg/symbian1.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- testsuite/gcc.dg/symbian1.c	3 Aug 2004 21:19:39 -0000
***************
*** 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() {}
+ 
Index: testsuite/gcc.dg/symbian2.c
===================================================================
RCS file: testsuite/gcc.dg/symbian2.c
diff -N testsuite/gcc.dg/symbian2.c
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- testsuite/gcc.dg/symbian2.c	3 Aug 2004 21:19:39 -0000
***************
*** 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");
+ }


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