OSDN Git Service

2011-06-30 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Jun 2011 08:44:18 +0000 (08:44 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Jun 2011 08:44:18 +0000 (08:44 +0000)
PR tree-optimization/38752
* gcc.c-torture/compile/pr38752.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175684 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr38752.c [new file with mode: 0644]

index ac67815..5d941c4 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-30  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/38752
+       * gcc.c-torture/compile/pr38752.c: New testcase.
+
 2011-06-30  Ira Rosen  <ira.rosen@linaro.org>
 
        * gcc.dg/vect/slp-widen-mult-half.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr38752.c b/gcc/testsuite/gcc.c-torture/compile/pr38752.c
new file mode 100644 (file)
index 0000000..3d409bf
--- /dev/null
@@ -0,0 +1,25 @@
+typedef struct
+{
+  int             baddr;
+} mstruct_t;
+
+static struct
+{
+  unsigned int    mapnum;
+  mstruct_t       unused;
+} mtab;
+
+static mstruct_t *mactab = &mtab.unused;
+
+int
+main(void)
+{
+  int i;
+  int addr;
+
+  for (i=1; i <= mtab.mapnum; i++)
+    if (addr < mactab[i].baddr)
+      break;
+  return 0;
+}
+