diff options
author | David Daney <ddaney@caviumnetworks.com> | 2009-12-04 17:46:23 +0000 |
---|---|---|
committer | David Daney <daney@gcc.gnu.org> | 2009-12-04 17:46:23 +0000 |
commit | d0e4968c33c257bcfa1afa4f499661c18c80e5bc (patch) | |
tree | 3644884bc7ca74ce76b6bc0e62b5e2e10bb44f61 /gcc/testsuite/gcc.c-torture | |
parent | c21237d52701733032eaa6fb97e4d233fabcaaaa (diff) | |
download | gcc-d0e4968c33c257bcfa1afa4f499661c18c80e5bc.zip gcc-d0e4968c33c257bcfa1afa4f499661c18c80e5bc.tar.gz gcc-d0e4968c33c257bcfa1afa4f499661c18c80e5bc.tar.bz2 |
re PR rtl-optimization/42164 (internal compiler error: in simplify_subreg, at simplify-rtx.c:5138)
2009-12-04 David Daney <ddaney@caviumnetworks.com>
PR rtl-optimization/42164
* combine.c (combine_simplify_rtx): Handle truncation of integer
constants.
2009-12-04 David Daney <ddaney@caviumnetworks.com>
PR rtl-optimization/42164
* gcc.c-torture/compile/pr42164.c: New test.
From-SVN: r154987
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr42164.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr42164.c b/gcc/testsuite/gcc.c-torture/compile/pr42164.c new file mode 100644 index 0000000..7b94aef --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr42164.c @@ -0,0 +1,25 @@ +typedef struct +{ + unsigned long long pte; +} pte_t; +pte_t mk_swap_pte (unsigned long offset) +{ + pte_t pte; + pte.pte = (offset << 40); + return pte; +} +int pte_file (pte_t pte) +{ + return pte.pte & (1 << 4); +} +typedef struct +{ + unsigned long val; +} swp_entry_t; +pte_t swp_entry_to_pte (swp_entry_t entry) +{ + swp_entry_t arch_entry; + arch_entry = (swp_entry_t){mk_swap_pte (swp_offset (entry)).pte}; + __BUG_ON ((unsigned long) pte_file ((pte_t) {arch_entry.val})); + return (pte_t) {arch_entry.val}; +} |