* gcc.target/avr/avr.exp: Add avr testsuite.
* gcc.target/avr/trivial.c: Add simple test.
* gcc.target/avr/torture/avr-torture.exp: Add avr-torture testsuite.
* gcc.target/avr/torture/trivial.c: Add simple test.
From-SVN: r136304
+2008-06-02 Andy Hutchinson <hutchinsonandy@aim.com>
+
+ * gcc.target/avr/avr.exp: Add avr testsuite.
+ * gcc.target/avr/trivial.c: Add simple test.
+ * gcc.target/avr/torture/avr-torture.exp: Add avr-torture testsuite.
+ * gcc.target/avr/torture/trivial.c: Add simple test.
+
2008-06-02 Andy Hutchinson <hutchinsonandy@aim.com>
* gcc.dg/pr19340.c: Disable for AVR as it has no scheduling.
--- /dev/null
+# Copyright (C) 2008 Free Software Foundation, Inc.\r
+\r
+# This program is free software; you can redistribute it and/or modify\r
+# it under the terms of the GNU General Public License as published by\r
+# the Free Software Foundation; either version 3 of the License, or\r
+# (at your option) any later version.\r
+# \r
+# This program is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+# GNU General Public License for more details.\r
+# \r
+# You should have received a copy of the GNU General Public License\r
+# along with GCC; see the file COPYING3. If not see\r
+# <http://www.gnu.org/licenses/>.\r
+\r
+# GCC testsuite that uses the `dg.exp' driver.\r
+\r
+# Exit immediately if this isn't an AVR target.\r
+if ![istarget avr-*-*] then {\r
+ return\r
+}\r
+\r
+# Load support procs.\r
+load_lib gcc-dg.exp\r
+\r
+# If a testcase doesn't have special options, use these.\r
+global DEFAULT_CFLAGS\r
+if ![info exists DEFAULT_CFLAGS] then {\r
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"\r
+}\r
+\r
+# Initialize `dg'.\r
+dg-init\r
+\r
+# Main loop.\r
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \\r
+ "" $DEFAULT_CFLAGS\r
+\r
+# All done.\r
+dg-finish\r
--- /dev/null
+# Copyright (C) 2008 Free Software Foundation, Inc.\r
+\r
+# This program is free software; you can redistribute it and/or modify\r
+# it under the terms of the GNU General Public License as published by\r
+# the Free Software Foundation; either version 3 of the License, or\r
+# (at your option) any later version.\r
+# \r
+# This program is distributed in the hope that it will be useful,\r
+# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+# GNU General Public License for more details.\r
+# \r
+# You should have received a copy of the GNU General Public License\r
+# along with GCC; see the file COPYING3. If not see\r
+# <http://www.gnu.org/licenses/>.\r
+\r
+# GCC testsuite that uses the `gcc-dg.exp' driver, looping over\r
+# optimization options.\r
+\r
+# Exit immediately if this isn't a AVR target.\r
+if { ![istarget avr-*-*] } then {\r
+ return\r
+}\r
+\r
+# Load support procs.\r
+load_lib gcc-dg.exp\r
+\r
+# If a testcase doesn't have special options, use these.\r
+global DEFAULT_CFLAGS\r
+if ![info exists DEFAULT_CFLAGS] then {\r
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"\r
+}\r
+\r
+# Initialize `dg'.\r
+dg-init\r
+\r
+ set AVR_TORTURE_OPTIONS [list \\r
+ { -O0 } \\r
+ { -O1 } \\r
+ { -O2 } \\r
+ { -O2 -mcall-prologues } \\r
+ { -Os -fomit-frame-pointer } \\r
+ { -Os -fomit-frame-pointer -finline-functions } \\r
+ { -O3 -g } \\r
+ { -Os -mcall-prologues} ]\r
+\r
+\r
+#Initialize use of torture lists. \r
+torture-init\r
+\r
+set-torture-options $AVR_TORTURE_OPTIONS\r
+\r
+\r
+# Main loop.\r
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] $DEFAULT_CFLAGS\r
+\r
+# Finalize use of torture lists.\r
+torture-finish\r
+\r
+# All done.\r
+dg-finish\r
--- /dev/null
+/* { dg-do run } */\r
+#include <stdio.h>\r
+\r
+#define __ATTR_PROGMEM__ __attribute__((__progmem__))\r
+\r
+#define PROGMEM __ATTR_PROGMEM__\r
+char PROGMEM a1 = 0x12; \r
+int PROGMEM a2 = 0x2345; \r
+long PROGMEM a3 = 0x12345678; \r
+int main(void)\r
+{\r
+ printf("Hello World\n");\r
+ return 0;\r
+}\r
--- /dev/null
+/* { dg-do run } */\r
+#include <stdio.h>\r
+\r
+#define __ATTR_PROGMEM__ __attribute__((__progmem__))\r
+\r
+#define PROGMEM __ATTR_PROGMEM__\r
+char PROGMEM a1 = 0x12; \r
+int PROGMEM a2 = 0x2345; \r
+long PROGMEM a3 = 0x12345678; \r
+int main(void)\r
+{\r
+ printf("Hello World\n");\r
+ return 0;\r
+}\r