~ubuntu-branches/debian/sid/gcc-4.8/sid

« back to all changes in this revision

Viewing changes to .svn/pristine/6a/6ab9f646770f6453ae2884a5803900592bdb8394.svn-base

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-12-19 19:48:34 UTC
  • Revision ID: package-import@ubuntu.com-20141219194834-4dz1q7rrn5pad823
Tags: 4.8.4-1
* GCC 4.8.4 release.
  - Fix PR target/61407 (darwin), PR middle-end/58624 (ice),
    PR sanitizer/64265 (wrong code).
* Require recent binutils to pass go test failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# DP: Fix PR tree-optimization/59586, segfault with -Ofast -floop-parallelize-all
 
2
 
 
3
gcc/
 
4
 
 
5
2014-06-29  Roman Gareev  <gareevroman@gmail.com>
 
6
 
 
7
        * graphite-dependences.c (subtract_commutative_associative_deps): 
 
8
        Add NULL checking of the following variables: must_raw_no_source, 
 
9
        may_raw_no_source, must_war_no_source, may_war_no_source, 
 
10
        must_waw_no_source, may_waw_no_source, must_raw, may_raw, 
 
11
        must_war, may_war, must_waw, may_waw
 
12
 
 
13
        testsuite/gfortran.dg/graphite/pr59586.f: New testcase.
 
14
 
 
15
--- a/src/gcc/testsuite/gfortran.dg/graphite/pr59586.f
 
16
+++ b/src/gcc/testsuite/gfortran.dg/graphite/pr59586.f
 
17
@@ -0,0 +1,11 @@
 
18
+! { dg-additional-options "-Ofast -floop-parallelize-all" }
 
19
+
 
20
+      subroutine subsm ( n, x, xp, xx)
 
21
+      integer        n, m, x(n),xp(n), xx(n), gg(n), dd_p
 
22
+      do 55 i=1, n
 
23
+         dd_p  = dd_p + (x(i) - xx(i))*gg(i)
 
24
+ 55   continue
 
25
+      if ( dd_p .gt. 0  ) then
 
26
+         call dcopy( n, xp, 1, x, 1 )
 
27
+      endif
 
28
+      end
 
29
--- a/src/gcc/graphite-dependences.c
 
30
+++ b/src/gcc/graphite-dependences.c
 
31
@@ -424,24 +424,71 @@
 
32
                                          &x_may_waw_no_source);
 
33
        gcc_assert (res == 0);
 
34
 
 
35
-       *must_raw = isl_union_map_subtract (*must_raw, x_must_raw);
 
36
-       *may_raw = isl_union_map_subtract (*may_raw, x_may_raw);
 
37
-       *must_raw_no_source = isl_union_map_subtract (*must_raw_no_source,
 
38
-                                                     x_must_raw_no_source);
 
39
-       *may_raw_no_source = isl_union_map_subtract (*may_raw_no_source,
 
40
-                                                    x_may_raw_no_source);
 
41
-       *must_war = isl_union_map_subtract (*must_war, x_must_war);
 
42
-       *may_war = isl_union_map_subtract (*may_war, x_may_war);
 
43
-       *must_war_no_source = isl_union_map_subtract (*must_war_no_source,
 
44
-                                                     x_must_war_no_source);
 
45
-       *may_war_no_source = isl_union_map_subtract (*may_war_no_source,
 
46
-                                                    x_may_war_no_source);
 
47
-       *must_waw = isl_union_map_subtract (*must_waw, x_must_waw);
 
48
-       *may_waw = isl_union_map_subtract (*may_waw, x_may_waw);
 
49
-       *must_waw_no_source = isl_union_map_subtract (*must_waw_no_source,
 
50
-                                                     x_must_waw_no_source);
 
51
-       *may_waw_no_source = isl_union_map_subtract (*may_waw_no_source,
 
52
-                                                    x_may_waw_no_source);
 
53
+       if (must_raw)
 
54
+         *must_raw = isl_union_map_subtract (*must_raw, x_must_raw);
 
55
+       else
 
56
+         isl_union_map_free (x_must_raw);
 
57
+
 
58
+       if (may_raw)
 
59
+         *may_raw = isl_union_map_subtract (*may_raw, x_may_raw);
 
60
+       else
 
61
+         isl_union_map_free (x_may_raw);
 
62
+
 
63
+       if (must_raw_no_source)
 
64
+         *must_raw_no_source = isl_union_map_subtract (*must_raw_no_source,
 
65
+                                                       x_must_raw_no_source);
 
66
+       else
 
67
+         isl_union_map_free (x_must_raw_no_source);
 
68
+
 
69
+       if (may_raw_no_source)
 
70
+         *may_raw_no_source = isl_union_map_subtract (*may_raw_no_source,
 
71
+                                                      x_may_raw_no_source);
 
72
+       else
 
73
+         isl_union_map_free (x_may_raw_no_source);
 
74
+
 
75
+       if (must_war)
 
76
+         *must_war = isl_union_map_subtract (*must_war, x_must_war);
 
77
+       else
 
78
+         isl_union_map_free (x_must_war);
 
79
+
 
80
+       if (may_war)
 
81
+         *may_war = isl_union_map_subtract (*may_war, x_may_war);
 
82
+       else
 
83
+         isl_union_map_free (x_may_war);
 
84
+
 
85
+       if (must_war_no_source)
 
86
+         *must_war_no_source = isl_union_map_subtract (*must_war_no_source,
 
87
+                                                       x_must_war_no_source);
 
88
+       else
 
89
+         isl_union_map_free (x_must_war_no_source);
 
90
+
 
91
+       if (may_war_no_source)
 
92
+         *may_war_no_source = isl_union_map_subtract (*may_war_no_source,
 
93
+                                                      x_may_war_no_source);
 
94
+       else
 
95
+         isl_union_map_free (x_may_war_no_source);
 
96
+
 
97
+       if (must_waw)
 
98
+         *must_waw = isl_union_map_subtract (*must_waw, x_must_waw);
 
99
+       else
 
100
+         isl_union_map_free (x_must_waw);
 
101
+
 
102
+       if (may_waw)
 
103
+         *may_waw = isl_union_map_subtract (*may_waw, x_may_waw);
 
104
+       else
 
105
+         isl_union_map_free (x_may_waw);
 
106
+
 
107
+       if (must_waw_no_source)
 
108
+         *must_waw_no_source = isl_union_map_subtract (*must_waw_no_source,
 
109
+                                                       x_must_waw_no_source);
 
110
+       else
 
111
+         isl_union_map_free (x_must_waw_no_source);
 
112
+
 
113
+       if (may_waw_no_source)
 
114
+         *may_waw_no_source = isl_union_map_subtract (*may_waw_no_source,
 
115
+                                                      x_may_waw_no_source);
 
116
+       else
 
117
+         isl_union_map_free (x_may_waw_no_source);
 
118
       }
 
119
 
 
120
   isl_union_map_free (original);