re PR target/35264 (ntfs-3g miscompiled)
authorMichael Matz <matz@suse.de>
Thu, 21 Feb 2008 12:38:35 +0000 (12:38 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Thu, 21 Feb 2008 12:38:35 +0000 (12:38 +0000)
        PR target/35264
        * config/i386/i386.c (ix86_expand_branch): Add missing breaks.

        * gcc.dg/pr35264.c: New testcase.

From-SVN: r132521

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr35264.c [new file with mode: 0644]

index b7ab324ae9f6d1414a28ce32dcdb5620db4324cb..c3dfc8acee5eee248c780f2c29d31bbe8802cab4 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-21  Michael Matz  <matz@suse.de>
+
+       PR target/35264
+       * config/i386/i386.c (ix86_expand_branch): Add missing breaks.
+
 2008-02-21  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (mov<mode>cc): Macroize expander from movsfcc,
index 5dad2fcf5159d2fcde28bbc021d526d0a876c920..5a4456d912bb63b1d39b4c41342f10046aee4753 100644 (file)
@@ -12148,6 +12148,7 @@ ix86_expand_branch (enum rtx_code code, rtx label)
                  ix86_expand_branch (code, label);
                  return;
                }
+             break;
            case LE: case LEU: case GT: case GTU:
              if (lo[1] == constm1_rtx)
                {
@@ -12156,6 +12157,7 @@ ix86_expand_branch (enum rtx_code code, rtx label)
                  ix86_expand_branch (code, label);
                  return;
                }
+             break;
            default:
              break;
            }
index 780efe8dfb1925f57b6abf6c264a754a20939d4c..259bfbe1236e39a6e4b46fe0e34b59f1fcbf29b2 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-21  Michael Matz  <matz@suse.de>
+
+       PR target/35264
+       * gcc.dg/pr35264.c: New testcase.
+
 2008-02-21  Richard Guenther  <rguenther@suse.de>
 
        * gfortran.dg/reassoc_1.f90: New testcase.
diff --git a/gcc/testsuite/gcc.dg/pr35264.c b/gcc/testsuite/gcc.dg/pr35264.c
new file mode 100644 (file)
index 0000000..a332efc
--- /dev/null
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O1" } */
+extern void abort(void);
+long long __attribute__((noinline)) get(void)
+{
+  return -2;
+}
+long long __attribute__((noinline)) get(void);
+int __attribute__((noinline)) check(void)
+{
+ long long lcn;
+
+ lcn = get();
+ if (lcn >= 0 || lcn == -1)
+  return 0;
+
+ return -1;
+}
+int main()
+{
+  if (check() == 0)
+    abort();
+  return 0;
+}