]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/4926 (C++ ABI needs clarification on mangling of complex expressions)
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 1 Apr 2009 18:09:21 +0000 (18:09 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 1 Apr 2009 18:09:21 +0000 (11:09 -0700)
2009-04-01  H.J. Lu  <hongjiu.lu@intel.com>

PR c++/4926
* g++.dg/template/pr4926-1.C: New.

From-SVN: r145423

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/pr4926-1.C [new file with mode: 0644]

index 708697bf1c27c5e0a135c83a4c84aac7f64f677f..b104b2ad59fc5c5008d0ee28039991b784bac00e 100644 (file)
@@ -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 (file)
index 0000000..ec2b226
--- /dev/null
@@ -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>();
+}