52 lines
1.4 KiB
Diff
52 lines
1.4 KiB
Diff
|
|
This backport contains 1 patch from gcc main stream tree.
|
||
|
|
The commit id of these patchs list as following in the order of time.
|
||
|
|
|
||
|
|
0001-IPA-compare-VRP-types.patch
|
||
|
|
a86623902767122c71c7229150a8b8a79cbb3673
|
||
|
|
|
||
|
|
diff -Nurp a/gcc/ipa-prop.c b/gcc/ipa-prop.c
|
||
|
|
--- a/gcc/ipa-prop.c 2020-11-28 00:19:34.340000000 +0800
|
||
|
|
+++ b/gcc/ipa-prop.c 2020-11-28 00:21:24.680000000 +0800
|
||
|
|
@@ -122,7 +122,8 @@ struct ipa_vr_ggc_hash_traits : public g
|
||
|
|
static bool
|
||
|
|
equal (const value_range_base *a, const value_range_base *b)
|
||
|
|
{
|
||
|
|
- return a->equal_p (*b);
|
||
|
|
+ return (a->equal_p (*b)
|
||
|
|
+ && types_compatible_p (a->type (), b->type ()));
|
||
|
|
}
|
||
|
|
static void
|
||
|
|
mark_empty (value_range_base *&p)
|
||
|
|
diff -Nurp a/gcc/testsuite/gcc.c-torture/execute/pr97404.c b/gcc/testsuite/gcc.c-torture/execute/pr97404.c
|
||
|
|
--- a/gcc/testsuite/gcc.c-torture/execute/pr97404.c 1970-01-01 08:00:00.000000000 +0800
|
||
|
|
+++ b/gcc/testsuite/gcc.c-torture/execute/pr97404.c 2020-11-28 00:21:24.680000000 +0800
|
||
|
|
@@ -0,0 +1,28 @@
|
||
|
|
+/* PR ipa/97404 */
|
||
|
|
+/* { dg-additional-options "-fno-inline" } */
|
||
|
|
+
|
||
|
|
+char a, b;
|
||
|
|
+long c;
|
||
|
|
+short d, e;
|
||
|
|
+long *f = &c;
|
||
|
|
+int g;
|
||
|
|
+char h(signed char i) { return 0; }
|
||
|
|
+static short j(short i, int k) { return i < 0 ? 0 : i >> k; }
|
||
|
|
+void l(void);
|
||
|
|
+void m(void)
|
||
|
|
+{
|
||
|
|
+ e = j(d | 9766, 11);
|
||
|
|
+ *f = e;
|
||
|
|
+}
|
||
|
|
+void l(void)
|
||
|
|
+{
|
||
|
|
+ a = 5 | g;
|
||
|
|
+ b = h(a);
|
||
|
|
+}
|
||
|
|
+int main()
|
||
|
|
+{
|
||
|
|
+ m();
|
||
|
|
+ if (c != 4)
|
||
|
|
+ __builtin_abort();
|
||
|
|
+ return 0;
|
||
|
|
+}
|