From 887d68d9e992b75ca7137d75a3037c54118257ac Mon Sep 17 00:00:00 2001 From: Kriang Lerdsuwanakij Date: Mon, 23 Feb 2004 14:12:56 +0000 Subject: [PATCH] re PR c++/14106 ([testcase] ICE on template func instanciation: stor-layout.c:1569) PR c++/14106 * g++.dg/ext/typeof9.C: New test. From-SVN: r78304 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/ext/typeof9.C | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 gcc/testsuite/g++.dg/ext/typeof9.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 40ea07f0190..9eaab98f3cc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-02-23 Kriang Lerdsuwanakij + + PR c++/14106 + * g++.dg/ext/typeof9.C: New test. + 2004-02-23 Giovanni Bajo PR c++/14250 diff --git a/gcc/testsuite/g++.dg/ext/typeof9.C b/gcc/testsuite/g++.dg/ext/typeof9.C new file mode 100644 index 00000000000..1547c0f2f6c --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/typeof9.C @@ -0,0 +1,17 @@ +// { dg-do compile } + +// Origin: gcc-bug@vogtner.de + +// PR c++/14106: ICE with typeof of function template. + +template +void j (T i) +{ +} + +template +void instanciate () { + static void (*fp) (T) = j; + __typeof__ (j) *p; // { dg-error "unknown|invalid" } +} +template void instanciate();