diff options
author | CoprDistGit <infra@openeuler.org> | 2024-08-01 14:23:42 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-08-01 14:23:42 +0000 |
commit | 82711f6567ef069eebb942e382e2c3fa61fbf538 (patch) | |
tree | 22200b7326b32ca672ffb6e4ce6d19a09dc476e5 /gcc48-pr78378.patch | |
parent | 5d624aa0d36abe76a344f0593eae5cf36d083b15 (diff) |
automatic import of compat-libgfortran-48openeuler24.03_LTSopeneuler23.09
Diffstat (limited to 'gcc48-pr78378.patch')
-rw-r--r-- | gcc48-pr78378.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/gcc48-pr78378.patch b/gcc48-pr78378.patch new file mode 100644 index 0000000..bc78b81 --- /dev/null +++ b/gcc48-pr78378.patch @@ -0,0 +1,43 @@ +2017-05-30 Jakub Jelinek <jakub@redhat.com> + + Backported from mainline + 2016-11-16 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/78378 + * combine.c (make_extraction): Use force_to_mode for non-{REG,MEM} + inner only if pos is 0. + + * gcc.c-torture/execute/pr78378.c: New test. + +--- gcc/combine.c ++++ gcc/combine.c +@@ -7342,6 +7342,7 @@ make_extraction (machine_mode mode, rtx inner, HOST_WIDE_INT pos, + if (tmode != BLKmode + && ((pos_rtx == 0 && (pos % BITS_PER_WORD) == 0 + && !MEM_P (inner) ++ && (pos == 0 || REG_P (inner)) + && (inner_mode == tmode + || !REG_P (inner) + || TRULY_NOOP_TRUNCATION_MODES_P (tmode, inner_mode) +--- /dev/null ++++ gcc/testsuite/gcc.c-torture/execute/pr78378.c +@@ -0,0 +1,18 @@ ++/* PR rtl-optimization/78378 */ ++ ++unsigned long long __attribute__ ((noinline, noclone)) ++foo (unsigned long long x) ++{ ++ x <<= 41; ++ x /= 232; ++ return 1 + (unsigned short) x; ++} ++ ++int ++main () ++{ ++ unsigned long long x = foo (1); ++ if (x != 0x2c24) ++ __builtin_abort(); ++ return 0; ++} + |