~ubuntu-branches/ubuntu/vivid/gcc-4.7/vivid

« back to all changes in this revision

Viewing changes to debian/patches/pr61801.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-07-28 17:45:58 UTC
  • Revision ID: package-import@ubuntu.com-20140728174558-hprfzukukxm8dd6r
Tags: 4.7.4-2ubuntu1
* Merge with Debian; remaining changes:
  - Build from upstream source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# DP: Fix PR rtl-optimization/61801.
 
2
 
 
3
gcc/
 
4
 
 
5
2014-07-17  Richard Biener  <rguenther@suse.de>
 
6
 
 
7
        PR rtl-optimization/61801
 
8
        * sched-deps.c (sched_analyze_2): For ASM_OPERANDS and
 
9
        ASM_INPUT don't set reg_pending_barrier if it appears in a
 
10
        debug-insn.
 
11
 
 
12
gcc/testsuite/
 
13
2014-07-28  Richard Biener  <rguenther@suse.de>
 
14
 
 
15
        PR rtl-optimization/61801
 
16
        * gcc.target/i386/pr61801.c: Fix testcase.
 
17
 
 
18
2014-07-28  Richard Biener  <rguenther@suse.de>
 
19
 
 
20
        PR rtl-optimization/61801
 
21
        * gcc.target/i386/pr61801.c: New testcase.
 
22
 
 
23
--- a/src/gcc/sched-deps.c
 
24
+++ a/src/gcc/sched-deps.c
 
25
@@ -2744,7 +2744,8 @@
 
26
           Consider for instance a volatile asm that changes the fpu rounding
 
27
           mode.  An insn should not be moved across this even if it only uses
 
28
           pseudo-regs because it might give an incorrectly rounded result.  */
 
29
-       if (code != ASM_OPERANDS || MEM_VOLATILE_P (x))
 
30
+       if ((code != ASM_OPERANDS || MEM_VOLATILE_P (x))
 
31
+           && !DEBUG_INSN_P (insn))
 
32
          reg_pending_barrier = TRUE_BARRIER;
 
33
 
 
34
        /* For all ASM_OPERANDS, we must traverse the vector of input operands.
 
35
--- a/src/gcc/testsuite/gcc.target/i386/pr61801.c
 
36
+++ b/src/gcc/testsuite/gcc.target/i386/pr61801.c
 
37
@@ -0,0 +1,22 @@
 
38
+/* { dg-do compile } */
 
39
+/* { dg-options "-Os -fcompare-debug" } */
 
40
+
 
41
+int a, b, c;
 
42
+void fn1 ()
 
43
+{
 
44
+  int d;
 
45
+  if (fn2 () && !0)
 
46
+    {
 
47
+      b = (
 
48
+          {
 
49
+          int e;
 
50
+          fn3 ();
 
51
+          switch (0)
 
52
+          default:
 
53
+          asm volatile("" : "=a"(e) : "0"(a), "i"(0));
 
54
+          e;
 
55
+          });
 
56
+      d = b;
 
57
+    }
 
58
+  c = d;
 
59
+}