]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: [multiple changes]
authorH.J. Lu <hongjiu.lu@intel.com>
Thu, 29 Jan 2009 17:06:01 +0000 (17:06 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Thu, 29 Jan 2009 17:06:01 +0000 (09:06 -0800)
2009-01-29  H.J. Lu  <hongjiu.lu@intel.com>

Backport from mainline:
2009-01-29  Steve Ellcey  <sje@cup.hp.com>

PR middle-end/38857
* gcc.c-torture/compile/pr38857.c: New test.

2009-01-28  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/38926
* gcc.c-torture/compile/pr38926.c: New testcase.

From-SVN: r143762

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

index 0bfa47eddbd9aa44d5cbd430fa1bddbb598b289c..12b3b017a4d67e38ff1a64a7a6421ab2c91360db 100644 (file)
@@ -1,3 +1,16 @@
+2009-01-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+       Backport from mainline:
+       2009-01-29  Steve Ellcey  <sje@cup.hp.com>
+
+       PR middle-end/38857
+       * gcc.c-torture/compile/pr38857.c: New test.
+
+       2009-01-28  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/38926
+       * gcc.c-torture/compile/pr38926.c: New testcase.
+
 2009-01-29  Uros Bizjak  <ubizjak@gmail.com>
 
        Backport from mainline:
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr38857.c b/gcc/testsuite/gcc.c-torture/compile/pr38857.c
new file mode 100644 (file)
index 0000000..2492b77
--- /dev/null
@@ -0,0 +1,22 @@
+static const int vs_total_ac_bits = 2680;
+typedef struct EncBlockInfo {
+      short mb[64];
+      unsigned char next[64];
+} EncBlockInfo;
+inline void dv_guess_qnos(EncBlockInfo* blks, int* qnos) {
+      int size[5];
+      int j, k, a, prev;
+      EncBlockInfo* b;
+      for(a=2; a==2 || vs_total_ac_bits < size[0]; a+=a){
+        for (j=0; j<6*5; j++, b++) {
+            for (k= b->next[prev]; k<64; k= b->next[k]) {
+                if(b->mb[k] < a && b->mb[k] > -a){
+                    b->next[prev] = b->next[k];
+                }
+                else{
+                    prev = k;
+                }
+            }
+        }
+     }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr38926.c b/gcc/testsuite/gcc.c-torture/compile/pr38926.c
new file mode 100644 (file)
index 0000000..9c71a79
--- /dev/null
@@ -0,0 +1,41 @@
+static inline int foo (unsigned _si1)
+{
+  if (_si1 != 0)
+    if (_si1 > 2147483647)
+      return 1;
+  return 0;
+}
+
+static inline unsigned bar (unsigned _left, int _right)
+{
+  return (unsigned) _right >= 8 ? 1 : _left >> _right;
+}
+
+unsigned g_2;
+unsigned g_67;
+volatile unsigned g_162;
+
+static inline int func_62 (unsigned p_63)
+{
+  p_63 = g_2 & g_67;
+  if (g_2)
+    ;
+  else if (p_63)
+    return 1;
+  g_67 = bar (p_63, g_2);
+  return 0;
+}
+
+unsigned baz (void)
+{
+  if (g_2)
+    for (; g_2 <= -16; g_2 = foo (g_2))
+      {
+        for (; g_162; g_162)
+          func_62 (func_62 (0));
+        if (g_67)
+          break;
+      }
+  return g_2;
+}
+