aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Comstedt <marcus@mc.pp.se>2004-01-15 13:40:05 +0100
committerJoern Rennecke <amylaar@gcc.gnu.org>2004-01-15 12:40:05 +0000
commit2ae8ea28cc74af2dffe4de91a3920bd941006cf9 (patch)
treea7a5031fe1575f66fd412d884bb713eab2a90b0a
parentc78661545d58ff402819646d976a5a744526477b (diff)
downloadgcc-2ae8ea28cc74af2dffe4de91a3920bd941006cf9.zip
gcc-2ae8ea28cc74af2dffe4de91a3920bd941006cf9.tar.gz
gcc-2ae8ea28cc74af2dffe4de91a3920bd941006cf9.tar.bz2
re PR target/9365 ([SH] segfault in gen_far_branch (config/sh/sh.c))
2004-01-15 Marcus Comstedt <marcus@mc.pp.se> Dan Kegel <dank@kegel.com> J"orn Rennecke <joern.rennecke@superh.com> PR target/9365 * gcc.dg/pr9365-1.c: New test. Co-Authored-By: Dan Kegel <dank@kegel.com> Co-Authored-By: J"orn Rennecke <joern.rennecke@superh.com> From-SVN: r75916
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gcc.dg/pr9365-1.c41
2 files changed, 48 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index ef55a94..9755bae 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-15 Marcus Comstedt <marcus@mc.pp.se>
+ Dan Kegel <dank@kegel.com>
+ J"orn Rennecke <joern.rennecke@superh.com>
+
+ PR target/9365
+ * gcc.dg/pr9365-1.c: New test.
+
2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/8856
diff --git a/gcc/testsuite/gcc.dg/pr9365-1.c b/gcc/testsuite/gcc.dg/pr9365-1.c
new file mode 100644
index 0000000..1c3db2f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr9365-1.c
@@ -0,0 +1,41 @@
+/* PR target/9365
+ * Origin: marcus@mc.pp.se
+ * Testcase tweaked by dank@kegel.com
+ * gcc 3.4 coverage by joern.rennecke@superh.com
+ * [3.3 regression] [SH] segfault in gen_far_branch (config/sh/sh.c)
+ * ice-on-valid-code
+ * Not marked as xfail since it's a regression
+*/
+/* { dg-do compile } */
+/* { dg-options "-O2 -fomit-frame-pointer" } */
+
+
+void foo(int n, int *p)
+{
+ switch(n) {
+ case 100: case 110: case 120: case 130: case 140: case 150: case 160:
+ case 200: case 210: case 220: case 230: case 240: case 250: case 260:
+ case 300: case 310: case 320: case 330: case 340: case 350: case 360:
+ case 400: case 410: case 420: case 430: case 440: case 450: case 460:
+ case 500: case 510: case 520: case 530: case 540: case 550: case 560:
+ case 600: case 610: case 620: case 630: case 640: case 650: case 660:
+ case 700: case 710: case 720: case 730: case 740: case 750: case 760:
+ case 800: case 810: case 820: case 830: case 840: case 850: case 860:
+ case 900: case 910: case 920: case 930: case 940: case 950: case 960:
+ break;
+ default:
+ *p = n;
+ break;
+ }
+}
+
+int main(int argc, char **argv)
+{
+ int p;
+
+ (void) argv;
+
+ foo(argc, &p);
+
+ return p;
+}