diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2009-04-01 18:09:21 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2009-04-01 11:09:21 -0700 |
commit | a5b38cdf510c827369e9577056de347ada498e37 (patch) | |
tree | f2e4e91b25a16224e35b949cd2f3584079828895 /gcc | |
parent | 839a3b8ab591c78acfcbc99842cda631d2a3b829 (diff) | |
download | gcc-a5b38cdf510c827369e9577056de347ada498e37.zip gcc-a5b38cdf510c827369e9577056de347ada498e37.tar.gz gcc-a5b38cdf510c827369e9577056de347ada498e37.tar.bz2 |
re PR c++/4926 (C++ ABI needs clarification on mangling of complex expressions)
2009-04-01 H.J. Lu <hongjiu.lu@intel.com>
PR c++/4926
* g++.dg/template/pr4926-1.C: New.
From-SVN: r145423
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/pr4926-1.C | 18 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 708697b..b104b2a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-04-01 H.J. Lu <hongjiu.lu@intel.com> + + PR c++/4926 + * g++.dg/template/pr4926-1.C: New. + 2009-04-01 Xinliang David Li <davidxl@google.com> * gcc.target/i386/all_one_m128i.c: New test. diff --git a/gcc/testsuite/g++.dg/template/pr4926-1.C b/gcc/testsuite/g++.dg/template/pr4926-1.C new file mode 100644 index 0000000..ec2b226 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/pr4926-1.C @@ -0,0 +1,18 @@ +// PR c++/4926 +// { dg-do compile } + +template <unsigned> struct X { typedef int Type; }; +template <typename T> struct Y { char array[1]; }; + +template<typename T> Y<T> P(T); // acts as "Y<typeof(T)>" + +struct F { int operator()() const; }; + +template <typename T> +typename X<sizeof(P( T()() ).array)>::Type foo(); + +void +bar () +{ + foo<F>(); +} |