From 713106ad882f390f783af0b4763257921559c76c Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 12 May 2014 08:42:41 +0000 Subject: [PATCH] re PR c++/51199 ([C++11][DR 547] gcc forms impossible types derived from function types with cv-qualifier-seq) 2014-05-12 Paolo Carlini PR c++/51199 * g++.dg/template/pr51199.C: New. From-SVN: r210321 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/template/pr51199.C | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/pr51199.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ff89aa5..80b1b54 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-05-12 Paolo Carlini + + PR c++/51199 + * g++.dg/template/pr51199.C: New. + 2014-05-11 Hans-Peter Nilsson * gcc.c-torture/execute/20101011-1.c [__MMIX__] (DO_TEST): Define as 0. diff --git a/gcc/testsuite/g++.dg/template/pr51199.C b/gcc/testsuite/g++.dg/template/pr51199.C new file mode 100644 index 0000000..e56b254 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/pr51199.C @@ -0,0 +1,17 @@ +// PR c++/51199 + +typedef void FC() const; + +template +struct add_ref { + typedef T& type; // { dg-error "forming reference" } +}; + +typedef add_ref::type ref_type; + +template +struct add_ptr { + typedef T* type; // { dg-error "forming pointer" } +}; + +typedef add_ptr::type ptr_type; -- 2.7.4