From d938e4612a745b6fa19fae8f68acbb3e5062cf47 Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Mon, 17 Oct 2005 02:28:44 +0000 Subject: [PATCH] re PR tree-optimization/22444 (ICE at tree-into-ssa.c:466) 2005-10-16 Daniel Berlin Fix PR tree-optimization/22444 * tree-ssa-alias.c (compute_flow_insensitive_aliasing): Assert that we don't hit something with subvars. (setup_pointers_and_addressables): Don't add things with subvars, because we'll already process the subvars for aliasing purposes. From-SVN: r105486 --- gcc/ChangeLog | 8 ++ gcc/testsuite/g++.dg/tree-ssa/pr22444.C | 141 ++++++++++++++++++++++++ gcc/tree-ssa-alias.c | 34 ++---- 3 files changed, 160 insertions(+), 23 deletions(-) create mode 100644 gcc/testsuite/g++.dg/tree-ssa/pr22444.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 58ebe1b7d8c..6612783daf0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2005-10-16 Daniel Berlin + + Fix PR tree-optimization/22444 + * tree-ssa-alias.c (compute_flow_insensitive_aliasing): + Assert that we don't hit something with subvars. + (setup_pointers_and_addressables): Don't add things with subvars, + because we'll already process the subvars for aliasing purposes. + 2005-10-16 Hans-Peter Nilsson PR target/23424 diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr22444.C b/gcc/testsuite/g++.dg/tree-ssa/pr22444.C new file mode 100644 index 00000000000..303a74d7675 --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/pr22444.C @@ -0,0 +1,141 @@ +// PR tree-optimization/22444 +// When creating SFT's, we shouldn't add the original variable +// to the addressable vars list, because this may cause false aliasing +// with the subvars leading to the subvars not being renamed when they should +// { dg-do compile } +// { dg-options "-O2" } +typedef int ptrdiff_t; +typedef unsigned int size_t; +namespace std +{ + template struct pair + { + _T1 first; + _T2 second; + pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } + }; +} +namespace __gnu_internal +{ + typedef char __one; + template __one __test_type(int _Tp::*); +} +namespace std +{ + template struct __is_pod + { + enum { __value = (sizeof(__gnu_internal::__test_type<_Tp>(0))!= sizeof(__gnu_internal::__one)) }; + }; + template struct iterator + { }; + template struct iterator_traits + { + typedef typename _Iterator::difference_type difference_type; + }; + template class reverse_iterator : public iterator::iterator_category, typename iterator_traits<_Iterator>::value_type, typename iterator_traits<_Iterator>::difference_type, typename iterator_traits<_Iterator>::pointer, typename iterator_traits<_Iterator>::reference> + { + typedef _Iterator iterator_type; + typedef typename iterator_traits<_Iterator>::difference_type difference_type; + typedef typename iterator_traits<_Iterator>::reference reference; + reverse_iterator operator+(difference_type __n) const {} + reverse_iterator& operator+=(difference_type __n) { } + reference operator[](difference_type __n) const { } + }; +} +namespace __gnu_cxx +{ + template class __pool; + template